SET IDENTITY_INSERT [CMS_Query] ON
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6192, N'insert', 0, N'INSERT INTO CMS_Tag ([TagName], [TagCount], [TagGroupID] ) VALUES ( @TagName, @TagCount, @TagGroupID); SELECT SCOPE_IDENTITY() AS [TagID]', 1, 1738, 0, '20081229 09:07:24', '39ebd867-5b53-4f25-9d99-07206c82f610', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6193, N'update', 0, N'UPDATE CMS_Tag SET [TagName] = @TagName, [TagCount] = @TagCount, [TagGroupID] = @TagGroupID WHERE [TagID] = @TagID', 0, 1738, 0, '20081229 09:07:24', 'e1de1cf3-9608-45ea-868b-6f41bad367fb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6195, N'deletetags', 0, N'DELETE CMS_DocumentTag FROM CMS_DocumentTag INNER JOIN CMS_Tag ON CMS_DocumentTag.TagID = CMS_Tag.TagID WHERE ((##WHERE##) AND CMS_Tag.TagGroupID = @TagGroupID) AND CMS_DocumentTag.DocumentID = @DocumentID', 0, 1737, 0, '20080902 16:08:43', '9328aa12-1245-1245-1245-a12a587a1231', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6259, N'delete', 0, N'DELETE FROM Community_GroupMember WHERE [MemberID] = @ID', 0, 1749, 0, '20081229 09:07:08', '1eb2815b-dac4-4a50-b48d-7d67dad46332', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6260, N'insert', 0, N'INSERT INTO Community_GroupMember ([MemberGUID], [MemberUserID], [MemberGroupID], [MemberJoined], [MemberApprovedWhen], [MemberRejectedWhen], [MemberApprovedByUserID], [MemberComment], [MemberInvitedByUserID], [MemberStatus] ) VALUES ( @MemberGUID, @MemberUserID, @MemberGroupID, @MemberJoined, @MemberApprovedWhen, @MemberRejectedWhen, @MemberApprovedByUserID, @MemberComment, @MemberInvitedByUserID, @MemberStatus); SELECT SCOPE_IDENTITY() AS [MemberID]', 1, 1749, 0, '20081229 09:07:08', '5f6f078a-579d-4c38-9b22-395962e3c731', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6261, N'update', 0, N'UPDATE Community_GroupMember SET [MemberGUID] = @MemberGUID, [MemberUserID] = @MemberUserID, [MemberGroupID] = @MemberGroupID, [MemberJoined] = @MemberJoined, [MemberApprovedWhen] = @MemberApprovedWhen, [MemberRejectedWhen] = @MemberRejectedWhen, [MemberApprovedByUserID] = @MemberApprovedByUserID, [MemberComment] = @MemberComment, [MemberInvitedByUserID] = @MemberInvitedByUserID, [MemberStatus] = @MemberStatus WHERE [MemberID] = @MemberID', 0, 1749, 0, '20081229 09:07:08', '06b55d6e-1080-4469-80a3-24dc890cf3ab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6246, N'delete', 0, N'DELETE FROM CMS_TimeZone WHERE [TimeZoneID] = @ID', 0, 1747, 0, '20081229 09:07:39', 'a5661c17-d5a7-40c3-824b-452865dd0e9e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6247, N'insert', 0, N'INSERT INTO CMS_TimeZone ([TimeZoneName], [TimeZoneDisplayName], [TimeZoneGMT], [TimeZoneDaylight], [TimeZoneRuleStartIn], [TimeZoneRuleStartRule], [TimeZoneRuleEndIn], [TimeZoneRuleEndRule], [TimeZoneGUID], [TimeZoneLastModified] ) VALUES ( @TimeZoneName, @TimeZoneDisplayName, @TimeZoneGMT, @TimeZoneDaylight, @TimeZoneRuleStartIn, @TimeZoneRuleStartRule, @TimeZoneRuleEndIn, @TimeZoneRuleEndRule, @TimeZoneGUID, @TimeZoneLastModified); SELECT SCOPE_IDENTITY() AS [TimeZoneID]', 1, 1747, 0, '20081229 09:07:39', '8f0023af-1548-4da6-92e6-ed023cc76b12', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6248, N'update', 0, N'UPDATE CMS_TimeZone SET [TimeZoneName] = @TimeZoneName, [TimeZoneDisplayName] = @TimeZoneDisplayName, [TimeZoneGMT] = @TimeZoneGMT, [TimeZoneDaylight] = @TimeZoneDaylight, [TimeZoneRuleStartIn] = @TimeZoneRuleStartIn, [TimeZoneRuleStartRule] = @TimeZoneRuleStartRule, [TimeZoneRuleEndIn] = @TimeZoneRuleEndIn, [TimeZoneRuleEndRule] = @TimeZoneRuleEndRule, [TimeZoneGUID] = @TimeZoneGUID, [TimeZoneLastModified] = @TimeZoneLastModified WHERE [TimeZoneID] = @TimeZoneID', 0, 1747, 0, '20081229 09:07:39', '94c64fd9-d84d-4427-8a1d-15bcdcbe691a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6236, N'delete', 0, N'DELETE FROM CMS_AlternativeForm WHERE [FormID] = @ID', 0, 1745, 0, '20081229 09:06:53', '68352f25-8c01-4de0-b69d-b02937ed8294', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6237, N'insert', 0, N'INSERT INTO CMS_AlternativeForm ([FormDisplayName], [FormName], [FormClassID], [FormDefinition], [FormLayout], [FormGUID], [FormLastModified], [FormCoupledClassID] ) VALUES ( @FormDisplayName, @FormName, @FormClassID, @FormDefinition, @FormLayout, @FormGUID, @FormLastModified, @FormCoupledClassID); SELECT SCOPE_IDENTITY() AS [FormID]', 1, 1745, 0, '20081229 09:06:53', 'e4a99065-fba2-4089-bf03-6ba614372613', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6238, N'update', 0, N'UPDATE CMS_AlternativeForm SET [FormDisplayName] = @FormDisplayName, [FormName] = @FormName, [FormClassID] = @FormClassID, [FormDefinition] = @FormDefinition, [FormLayout] = @FormLayout, [FormGUID] = @FormGUID, [FormLastModified] = @FormLastModified, [FormCoupledClassID] = @FormCoupledClassID WHERE [FormID] = @FormID', 0, 1745, 0, '20081229 09:06:53', 'af8084c0-229d-4e6d-b807-1647cbb0e78e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6388, N'removedependencies', 1, N'Proc_CMS_Avatar_RemoveDependencies', 0, 1750, 0, '20081003 08:26:54', '3f76cc57-748e-429e-96e4-e2961f5c16ba', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6455, N'delete', 0, N'DELETE FROM CMS_Badge WHERE [BadgeID] = @ID', 0, 1787, 0, '20090421 12:20:12', 'cb4c37c4-8212-442f-a67a-1eb2a1ffede8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6456, N'insert', 0, N'INSERT INTO CMS_Badge ([BadgeName], [BadgeDisplayName], [BadgeImageURL], [BadgeIsAutomatic], [BadgeTopLimit], [BadgeGUID], [BadgeLastModified] ) VALUES ( @BadgeName, @BadgeDisplayName, @BadgeImageURL, @BadgeIsAutomatic, @BadgeTopLimit, @BadgeGUID, @BadgeLastModified); SELECT SCOPE_IDENTITY() AS [BadgeID]', 1, 1787, 0, '20090421 12:20:12', '636e50ec-a6b3-4d2e-8c7a-71eeb1e3a115', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6457, N'update', 0, N'UPDATE CMS_Badge SET [BadgeName] = @BadgeName, [BadgeDisplayName] = @BadgeDisplayName, [BadgeImageURL] = @BadgeImageURL, [BadgeIsAutomatic] = @BadgeIsAutomatic, [BadgeTopLimit] = @BadgeTopLimit, [BadgeGUID] = @BadgeGUID, [BadgeLastModified] = @BadgeLastModified WHERE [BadgeID] = @BadgeID', 0, 1787, 0, '20090421 12:20:12', '092c38db-64c3-4da6-baa5-9b598000e77f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6556, N'getmoderators', 0, N'SELECT * FROM [CMS_USER] WHERE UserID IN (SELECT UserID FROM [Board_Moderator] WHERE BoardID = @BoardID)', 0, 1788, 0, '20080827 07:49:54', 'f1f3b1ba-962b-414c-bf7d-49863baa138d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6564, N'removedependencies', 1, N'Proc_BadWords_Word_RemoveDependencies', 0, 1771, 0, '20080827 00:00:00', '0f9a34c0-163b-4a26-96e2-8cc7ba1b8b23', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6572, N'delete', 0, N'DELETE FROM Notification_Gateway WHERE [GatewayID] = @ID', 0, 1808, 0, '20081229 09:07:13', '1c12218f-0cc5-431b-979f-cc4331bb5b2b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6573, N'insert', 0, N'INSERT INTO Notification_Gateway ([GatewayName], [GatewayDisplayName], [GatewayAssemblyName], [GatewayClassName], [GatewayDescription], [GatewaySupportsEmail], [GatewaySupportsPlainText], [GatewaySupportsHTMLText], [GatewayLastModified], [GatewayGUID], [GatewayEnabled] ) VALUES ( @GatewayName, @GatewayDisplayName, @GatewayAssemblyName, @GatewayClassName, @GatewayDescription, @GatewaySupportsEmail, @GatewaySupportsPlainText, @GatewaySupportsHTMLText, @GatewayLastModified, @GatewayGUID, @GatewayEnabled); SELECT SCOPE_IDENTITY() AS [GatewayID]', 1, 1808, 0, '20081229 09:07:13', '6c4f073f-54cd-4cb8-8cf7-6d51a487bea6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6487, N'delete', 0, N'DELETE FROM Board_Message WHERE [MessageID] = @ID', 0, 1791, 0, '20081229 09:07:11', 'e69f433d-4402-4743-a43a-a5b4357c2ea7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6488, N'insert', 0, N'INSERT INTO Board_Message ([MessageUserName], [MessageText], [MessageEmail], [MessageURL], [MessageIsSpam], [MessageBoardID], [MessageApproved], [MessageApprovedByUserID], [MessageUserID], [MessageUserInfo], [MessageAvatarGUID], [MessageInserted], [MessageLastModified], [MessageGUID], [MessageRatingValue] ) VALUES ( @MessageUserName, @MessageText, @MessageEmail, @MessageURL, @MessageIsSpam, @MessageBoardID, @MessageApproved, @MessageApprovedByUserID, @MessageUserID, @MessageUserInfo, @MessageAvatarGUID, @MessageInserted, @MessageLastModified, @MessageGUID, @MessageRatingValue); SELECT SCOPE_IDENTITY() AS [MessageID]', 1, 1791, 0, '20081229 09:07:11', '909ef0c5-4477-4b05-b306-ad8d25b9178f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6489, N'update', 0, N'UPDATE Board_Message SET [MessageUserName] = @MessageUserName, [MessageText] = @MessageText, [MessageEmail] = @MessageEmail, [MessageURL] = @MessageURL, [MessageIsSpam] = @MessageIsSpam, [MessageBoardID] = @MessageBoardID, [MessageApproved] = @MessageApproved, [MessageApprovedByUserID] = @MessageApprovedByUserID, [MessageUserID] = @MessageUserID, [MessageUserInfo] = @MessageUserInfo, [MessageAvatarGUID] = @MessageAvatarGUID, [MessageInserted] = @MessageInserted, [MessageLastModified] = @MessageLastModified, [MessageGUID] = @MessageGUID, [MessageRatingValue] = @MessageRatingValue WHERE [MessageID] = @MessageID', 0, 1791, 0, '20081229 09:07:11', '723cf555-c278-4dfe-90d8-2a9ff56ff9e4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6519, N'delete', 0, N'DELETE FROM Board_Role WHERE [BoardID] = @BoardID AND [RoleID] = @RoleID', 0, 1797, 0, '20081229 09:07:12', '514e0a59-62c1-4169-8988-d57813aa4abc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6520, N'insert', 0, N'INSERT INTO Board_Role ([BoardID], [RoleID] ) VALUES ( @BoardID, @RoleID);', 1, 1797, 0, '20081229 09:07:12', 'c6b27a2e-d796-4bad-aa69-38b659922d20', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6521, N'update', 0, N'SELECT NULL', 0, 1797, 0, '20081229 09:07:12', '4dce5966-93d3-41f6-b8ad-25253bb31d11', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6547, N'delete', 0, N'DELETE FROM BadWords_WordCulture WHERE [WordID] = @WordID AND [CultureID] = @CultureID', 0, 1803, 0, '20081229 09:06:54', 'c839c6fc-1d5a-4e48-8121-e31b8b73024c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6548, N'insert', 0, N'INSERT INTO BadWords_WordCulture ([WordID], [CultureID] ) VALUES ( @WordID, @CultureID);', 1, 1803, 0, '20081229 09:06:54', 'eff8160d-aa70-4267-9de3-6750330c471f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6549, N'update', 0, N'SELECT NULL', 0, 1803, 0, '20081229 09:06:54', '0fee070a-3911-4d4d-95b0-de2b2039266f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6552, N'delete', 0, N'DELETE FROM Board_Moderator WHERE [BoardID] = @BoardID AND [UserID] = @UserID', 0, 1804, 0, '20081229 09:07:11', 'abc9b5f0-b98c-4579-bf15-9304c42b75e5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6553, N'insert', 0, N'INSERT INTO Board_Moderator ([BoardID], [UserID] ) VALUES ( @BoardID, @UserID);', 1, 1804, 0, '20081229 09:07:11', 'ba7a06f5-28be-482d-87f9-2138de175104', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6554, N'update', 0, N'SELECT NULL', 0, 1804, 0, '20081229 09:07:11', 'a61e72e3-4f4e-4704-9e67-38cb5232debd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6574, N'update', 0, N'UPDATE Notification_Gateway SET [GatewayName] = @GatewayName, [GatewayDisplayName] = @GatewayDisplayName, [GatewayAssemblyName] = @GatewayAssemblyName, [GatewayClassName] = @GatewayClassName, [GatewayDescription] = @GatewayDescription, [GatewaySupportsEmail] = @GatewaySupportsEmail, [GatewaySupportsPlainText] = @GatewaySupportsPlainText, [GatewaySupportsHTMLText] = @GatewaySupportsHTMLText, [GatewayLastModified] = @GatewayLastModified, [GatewayGUID] = @GatewayGUID, [GatewayEnabled] = @GatewayEnabled WHERE [GatewayID] = @GatewayID', 0, 1808, 0, '20081229 09:07:13', 'dff12bd2-b8e1-42c2-b117-06924efa5884', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6445, N'removedependencies', 1, N'Proc_Community_Group_RemoveDependencies', 0, 1748, 0, '20081003 08:27:23', '188700ff-5ce6-4017-be22-23dd57d5269a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6584, N'delete', 1, N'Proc_CMS_Email_DeleteEmail', 0, 1809, 1, '20081118 14:04:27', '0b7736a4-87eb-49a2-b668-b70e5788c0c0', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6605, N'delete', 0, N'DELETE FROM Notification_Template WHERE [TemplateID] = @ID', 0, 1813, 0, '20081229 09:07:13', '3b75ab6d-a0b8-4063-bd69-0f10e247137d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6606, N'insert', 0, N'INSERT INTO Notification_Template ([TemplateName], [TemplateDisplayName], [TemplateSiteID], [TemplateLastModified], [TemplateGUID] ) VALUES ( @TemplateName, @TemplateDisplayName, @TemplateSiteID, @TemplateLastModified, @TemplateGUID); SELECT SCOPE_IDENTITY() AS [TemplateID]', 1, 1813, 0, '20081229 09:07:13', '3f38ce84-03aa-4d6f-a126-559d8a561c8d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6607, N'update', 0, N'UPDATE Notification_Template SET [TemplateName] = @TemplateName, [TemplateDisplayName] = @TemplateDisplayName, [TemplateSiteID] = @TemplateSiteID, [TemplateLastModified] = @TemplateLastModified, [TemplateGUID] = @TemplateGUID WHERE [TemplateID] = @TemplateID', 0, 1813, 0, '20081229 09:07:13', '19e49193-e855-44d6-80f1-d555c2d5c650', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6594, N'delete', 0, N'DELETE FROM CMS_AttachmentForEmail WHERE [EmailID] = @EmailID AND [AttachmentID] = @AttachmentID', 0, 1811, 0, '20081229 09:06:54', '4619fd71-389d-41b3-b0aa-d7afe8bb130f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6595, N'insert', 0, N'INSERT INTO CMS_AttachmentForEmail ([EmailID], [AttachmentID] ) VALUES ( @EmailID, @AttachmentID);', 1, 1811, 0, '20081229 09:06:54', '3ce5c98f-56d0-4f98-bfe1-275e46d60883', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6596, N'update', 0, N'SELECT NULL', 0, 1811, 0, '20081229 09:06:54', 'ae0a3b93-7c77-46a5-9510-0ddf7e51cc25', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6610, N'delete', 0, N'DELETE FROM Notification_TemplateText WHERE [TemplateTextID] = @ID', 0, 1814, 0, '20081229 09:07:13', 'cae2ffa0-d239-44ee-b1a1-6fc0e3f05197', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6611, N'insert', 0, N'INSERT INTO Notification_TemplateText ([TemplateID], [GatewayID], [TemplateSubject], [TemplateHTMLText], [TemplatePlainText], [TemplateTextGUID], [TemplateTextLastModified] ) VALUES ( @TemplateID, @GatewayID, @TemplateSubject, @TemplateHTMLText, @TemplatePlainText, @TemplateTextGUID, @TemplateTextLastModified); SELECT SCOPE_IDENTITY() AS [TemplateTextID]', 1, 1814, 0, '20081229 09:07:13', 'ede87f0b-cc41-4c64-a485-12eefa1c3306', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6612, N'update', 0, N'UPDATE Notification_TemplateText SET [TemplateID] = @TemplateID, [GatewayID] = @GatewayID, [TemplateSubject] = @TemplateSubject, [TemplateHTMLText] = @TemplateHTMLText, [TemplatePlainText] = @TemplatePlainText, [TemplateTextGUID] = @TemplateTextGUID, [TemplateTextLastModified] = @TemplateTextLastModified WHERE [TemplateTextID] = @TemplateTextID', 0, 1814, 0, '20081229 09:07:13', '28bade86-313d-4f0c-9bb8-5eb02351b509', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6615, N'delete', 0, N'DELETE FROM Notification_Subscription WHERE [SubscriptionID] = @ID', 0, 1815, 0, '20081229 09:07:13', '963ca0d6-6ce0-460f-b900-bc222f3607c8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6616, N'insert', 0, N'INSERT INTO Notification_Subscription ([SubscriptionGatewayID], [SubscriptionTemplateID], [SubscriptionEventSource], [SubscriptionEventCode], [SubscriptionEventDisplayName], [SubscriptionEventObjectID], [SubscriptionTime], [SubscriptionUserID], [SubscriptionTarget], [SubscriptionLastModified], [SubscriptionGUID], [SubscriptionEventData1], [SubscriptionEventData2], [SubscriptionUseHTML], [SubscriptionSiteID] ) VALUES ( @SubscriptionGatewayID, @SubscriptionTemplateID, @SubscriptionEventSource, @SubscriptionEventCode, @SubscriptionEventDisplayName, @SubscriptionEventObjectID, @SubscriptionTime, @SubscriptionUserID, @SubscriptionTarget, @SubscriptionLastModified, @SubscriptionGUID, @SubscriptionEventData1, @SubscriptionEventData2, @SubscriptionUseHTML, @SubscriptionSiteID); SELECT SCOPE_IDENTITY() AS [SubscriptionID]', 1, 1815, 0, '20081229 09:07:13', '220acf90-ab64-4f76-ae39-0b9887d18c5d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6617, N'update', 0, N'UPDATE Notification_Subscription SET [SubscriptionGatewayID] = @SubscriptionGatewayID, [SubscriptionTemplateID] = @SubscriptionTemplateID, [SubscriptionEventSource] = @SubscriptionEventSource, [SubscriptionEventCode] = @SubscriptionEventCode, [SubscriptionEventDisplayName] = @SubscriptionEventDisplayName, [SubscriptionEventObjectID] = @SubscriptionEventObjectID, [SubscriptionTime] = @SubscriptionTime, [SubscriptionUserID] = @SubscriptionUserID, [SubscriptionTarget] = @SubscriptionTarget, [SubscriptionLastModified] = @SubscriptionLastModified, [SubscriptionGUID] = @SubscriptionGUID, [SubscriptionEventData1] = @SubscriptionEventData1, [SubscriptionEventData2] = @SubscriptionEventData2, [SubscriptionUseHTML] = @SubscriptionUseHTML, [SubscriptionSiteID] = @SubscriptionSiteID WHERE [SubscriptionID] = @SubscriptionID', 0, 1815, 0, '20081229 09:07:13', '24f667bb-5930-4529-a506-c52b64b0121c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6793, N'removealltags', 1, N'Proc_CMS_DocumentTag_RemoveTags', 1, 1737, 0, '20080903 08:49:32', 'c062b6d4-a650-4587-9e4a-bf5cb0167abe', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6796, N'addtag', 1, N'Proc_CMS_DocumentTag_AddTag', 1, 1737, 0, '20080903 10:15:01', '3d60c618-ba95-44ff-89c3-7f8d40007410', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6603, N'removedependencies', 1, N'Proc_Notification_Gateway_RemoveDependencies', 0, 1808, 0, '20080829 08:34:34', '3b5566f1-a8d6-407a-8bbe-be2885abd131', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6849, N'documentsincategory', 0, N'SELECT COUNT(DocumentID) FROM CMS_DocumentCategory WHERE CategoryID = @CategoryID', 0, 1726, 0, '20080905 10:52:08', 'e9d1076c-9c81-4eaa-a509-e39c5b563c9c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6851, N'bindattachment', 1, N'Proc_CMS_Email_BindAttachment', 0, 1809, 0, '20081118 14:02:51', '0d6c86ca-0adc-407d-9ee6-83d0e0cff5f1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6852, N'deleteall', 1, N'Proc_CMS_Email_DeleteAll WHERE ##WHERE##', 0, 1809, 1, '20081118 14:04:08', 'fcb96dbf-85f0-48f3-8f90-2a7a0f731c9f', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6853, N'fetchemailstosend', 1, N'Proc_CMS_Email_FetchEmailToSend', 0, 1809, 0, '20081118 14:04:35', 'cdc43c1f-92ee-478c-aec8-948c67a7f45c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6855, N'delete', 0, N'DELETE FROM Messaging_ContactList WHERE [ContactListUserID] = @ContactListUserID AND [ContactListContactUserID] = @ContactListContactUserID', 0, 1887, 0, '20081229 09:07:12', 'd61b3439-b5d4-4a25-a270-d1fdffb3a2ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6856, N'insert', 0, N'INSERT INTO Messaging_ContactList ([ContactListUserID], [ContactListContactUserID] ) VALUES ( @ContactListUserID, @ContactListContactUserID);', 1, 1887, 0, '20081229 09:07:12', '1e7fca62-7d0c-4496-8378-c7b7d12885b8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6857, N'update', 0, N'SELECT NULL', 0, 1887, 0, '20081229 09:07:12', '9de19972-34f3-4a7d-8487-0d354d6ab9c2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6860, N'delete', 0, N'DELETE FROM Messaging_IgnoreList WHERE [IgnoreListUserID] = @IgnoreListUserID AND [IgnoreListIgnoredUserID] = @IgnoreListIgnoredUserID', 0, 1888, 0, '20081229 09:07:12', '82a39f47-3847-463b-864e-dcb6bb2c9b77', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6861, N'insert', 0, N'INSERT INTO Messaging_IgnoreList ([IgnoreListUserID], [IgnoreListIgnoredUserID] ) VALUES ( @IgnoreListUserID, @IgnoreListIgnoredUserID);', 1, 1888, 0, '20081229 09:07:12', '5f0dbe49-18d9-4859-aa8b-71a0147e10e6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6862, N'update', 0, N'SELECT NULL', 0, 1888, 0, '20081229 09:07:12', '95593949-b7e4-4418-991d-140fd7262afd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6901, N'delete', 0, N'DELETE FROM Board_Subscription WHERE [SubscriptionID] = @ID', 0, 1895, 0, '20081229 09:07:12', '75a4355f-6968-4c09-9961-2459a0136a7d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6902, N'insert', 0, N'INSERT INTO Board_Subscription ([SubscriptionBoardID], [SubscriptionUserID], [SubscriptionEmail], [SubscriptionLastModified], [SubscriptionGUID] ) VALUES ( @SubscriptionBoardID, @SubscriptionUserID, @SubscriptionEmail, @SubscriptionLastModified, @SubscriptionGUID); SELECT SCOPE_IDENTITY() AS [SubscriptionID]', 1, 1895, 0, '20081229 09:07:12', '0c057994-200c-4481-abe2-eaeeae92d4b6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6903, N'update', 0, N'UPDATE Board_Subscription SET [SubscriptionBoardID] = @SubscriptionBoardID, [SubscriptionUserID] = @SubscriptionUserID, [SubscriptionEmail] = @SubscriptionEmail, [SubscriptionLastModified] = @SubscriptionLastModified, [SubscriptionGUID] = @SubscriptionGUID WHERE [SubscriptionID] = @SubscriptionID', 0, 1895, 0, '20081229 09:07:12', 'a10c3b56-2a84-43e5-827f-af1224c8e0a2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6890, N'InitCustomTableOrders', 0, N'/* Declare the selection table */
DECLARE @itemsTable TABLE (
	ItemID int NOT NULL,
	ItemOrder int NULL
);
/* Get the steps list */
INSERT INTO @itemsTable SELECT ItemID, ItemOrder FROM ##TABLE## 
/* Declare the cursor to loop through the table */
DECLARE @cursor CURSOR;
SET @cursor = CURSOR FOR SELECT ItemID, ItemOrder FROM @itemsTable ORDER BY ItemOrder ASC, ItemID ASC;
/* Assign the numbers */
DECLARE @currentIndex int, @currentItemOrder int;
SET @currentIndex = 1;
DECLARE @currentItemId int;
/* Loop through the table */
OPEN @cursor
FETCH NEXT FROM @cursor INTO @currentItemId, @currentItemOrder;
WHILE @@FETCH_STATUS = 0
BEGIN
	/* Set the step index if different */
	IF @currentItemOrder IS NULL OR @currentItemOrder <> @currentIndex
		UPDATE ##TABLE## SET ItemOrder = @currentIndex WHERE ItemID = @currentItemId;
	/* Get next record */
	SET @currentIndex = @currentIndex + 1;
	FETCH NEXT FROM @cursor INTO @currentItemId, @currentItemOrder;
END
CLOSE @cursor;
DEALLOCATE @cursor;', 1, 145, 0, '20080910 13:16:47', '871d1d9f-0c20-4a64-ae68-892d4da5718d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6891, N'MoveCustomTableItemUp', 0, N'/* Move the previous item(s) down */
UPDATE ##TABLE## SET ItemOrder = ItemOrder + 1 WHERE ItemOrder = (SELECT ItemOrder FROM ##TABLE## WHERE ItemID = @ItemID) - 1 
/* Move the current item up */
UPDATE ##TABLE## SET ItemOrder = ItemOrder - 1 WHERE ItemID = @ItemID AND ItemOrder > 1', 1, 145, 0, '20080910 12:43:56', '20919bca-0d8b-4a3d-bd5d-9a3ee4677625', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6892, N'MoveCustomTableItemDown', 0, N'DECLARE @MaxOrder int
SET @MaxOrder = (SELECT TOP 1 ItemOrder FROM ##TABLE## ORDER BY ItemOrder DESC);
/* Move the next item(s) up*/
UPDATE ##TABLE## SET ItemOrder = ItemOrder - 1 WHERE ItemOrder = (SELECT ItemOrder FROM ##TABLE## WHERE ItemID = @ItemID) + 1 
/* Move the current item down */
UPDATE ##TABLE## SET ItemOrder = ItemOrder + 1 WHERE ItemID = @ItemID AND ItemOrder < @MaxOrder', 1, 145, 0, '20080910 13:49:41', '0542a6b0-bdf3-4769-8f57-18b45ac6c951', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6893, N'removedependencies', 1, N'Proc_Board_Board_RemoveDependencies', 0, 1788, 0, '20080910 13:17:17', '478155bc-1d74-4a8d-8e34-26248e817d6c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6894, N'deletedocumentboards', 1, N'Proc_Board_Board_DeleteDocumentBoards', 0, 1788, 0, '20080910 14:09:46', '020dda32-3ca0-477c-8328-f967b0a3c470', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6997, N'delete', 0, N'DELETE FROM Forums_UserFavorites WHERE [FavoriteID] = @ID', 0, 1913, 0, '20081229 09:07:08', 'b999268b-c4f5-4c50-89a7-7b1d575112f5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6998, N'insert', 0, N'INSERT INTO Forums_UserFavorites ([UserID], [PostID], [ForumID], [FavoriteName], [SiteID], [FavoriteGUID], [FavoriteLastModified] ) VALUES ( @UserID, @PostID, @ForumID, @FavoriteName, @SiteID, @FavoriteGUID, @FavoriteLastModified); SELECT SCOPE_IDENTITY() AS [FavoriteID]', 1, 1913, 0, '20081229 09:07:08', '13437a2c-51e0-4dd0-bf7b-da237dec5598', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6999, N'update', 0, N'UPDATE Forums_UserFavorites SET [UserID] = @UserID, [PostID] = @PostID, [ForumID] = @ForumID, [FavoriteName] = @FavoriteName, [SiteID] = @SiteID, [FavoriteGUID] = @FavoriteGUID, [FavoriteLastModified] = @FavoriteLastModified WHERE [FavoriteID] = @FavoriteID', 0, 1913, 0, '20081229 09:07:08', '3d9171d6-48b2-42e4-abc7-122a3dabfad6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7001, N'deletefordocument', 0, N'DELETE FROM CMS_DocumentCategory WHERE DocumentID = @DocumentID', 0, 1726, 0, '20080917 17:23:22', 'a7ab3f33-b8ce-4aff-beef-53035cbbb25e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7061, N'update', 0, N'UPDATE CMS_EmailUser SET [LastSendResult] = @LastSendResult, [LastSendAttempt] = @LastSendAttempt, [Status] = @Status WHERE [EmailID] = @EmailID AND [UserID] = @UserID', 0, 1926, 0, '20081229 09:07:04', '1c9a0b4a-677f-4f2a-8e76-0778b0661042', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7068, N'fetchmassemail', 1, N'Proc_CMS_Email_FetchMassEmail', 0, 1809, 0, '20081118 14:04:43', 'd2f94cae-5a1c-42c5-8500-aae17491e06f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7063, N'unstickthread', 1, N'Proc_Forums_ForumPost_UnstickThread', 0, 1123, 0, '20080923 10:01:21', '81d78a92-e326-4bf7-9f83-570542494422', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7133, N'delete', 0, N'DELETE FROM Media_LibraryRolePermission WHERE [LibraryID] = @LibraryID AND [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 1937, 0, '20081229 09:07:11', 'a2a07702-e4f7-414a-ba96-61098f38d96d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7134, N'insert', 0, N'INSERT INTO Media_LibraryRolePermission ([LibraryID], [RoleID], [PermissionID] ) VALUES ( @LibraryID, @RoleID, @PermissionID);', 1, 1937, 0, '20081229 09:07:11', '6d4f2952-48f0-4d75-8a28-b4229e2bcdf6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7135, N'update', 0, N'SELECT NULL', 0, 1937, 0, '20081229 09:07:11', '0cb55a51-ac7e-4c35-ae95-37368ef4fadb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7144, N'RemoveDependencies', 1, N'Proc_Forums_ForumPost_RemoveDependencies', 1, 1123, 0, '20081008 17:52:33', '4f354da1-2295-454c-b1c0-7f2f1bb82d4a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7145, N'ClearDefaultUserAvatar', 0, N'UPDATE CMS_Avatar SET DefaultUserAvatar = 0', 0, 1750, 0, '20081009 12:01:47', 'dc71a8c1-d912-4888-a647-96d125cdb523', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7146, N'ClearDefaultMaleAvatar', 0, N'UPDATE CMS_Avatar SET DefaultMaleUserAvatar = 0', 0, 1750, 0, '20081009 17:45:53', '8da16702-8098-43b2-8287-aead48be8816', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7147, N'ClearDefaultFemaleAvatar', 0, N'UPDATE CMS_Avatar SET DefaultFemaleUserAvatar = 0', 0, 1750, 0, '20081009 17:45:46', 'f30c4552-4757-4204-b556-059790a4ed58', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7148, N'ClearDefaultGroupAvatar', 0, N'UPDATE CMS_Avatar SET DefaultGroupAvatar = 0', 0, 1750, 0, '20081009 12:02:45', '10be857e-9efe-4b82-993d-16a92d99cb26', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7242, N'movethread', 0, N'UPDATE [Forums_ForumPost] SET [PostForumID] = @NewForumID WHERE PostIDPath LIKE @ThreadPath + ''%''', 0, 1123, 0, '20081021 10:43:41', '440f78f1-fbb8-4f73-a9bc-5a1741fff066', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7119, N'insert', 0, N'INSERT INTO Media_Library ([LibraryName], [LibraryDisplayName], [LibraryDescription], [LibraryFolder], [LibraryAccess], [LibraryGroupID], [LibrarySiteID], [LibraryGUID], [LibraryLastModified], [LibraryTeaserPath] ) VALUES ( @LibraryName, @LibraryDisplayName, @LibraryDescription, @LibraryFolder, @LibraryAccess, @LibraryGroupID, @LibrarySiteID, @LibraryGUID, @LibraryLastModified, @LibraryTeaserPath); SELECT SCOPE_IDENTITY() AS [LibraryID]', 1, 1934, 0, '20081229 09:07:11', 'a5a9b446-8bd6-4abd-960d-91ec0cece37d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7120, N'update', 0, N'UPDATE Media_Library SET [LibraryName] = @LibraryName, [LibraryDisplayName] = @LibraryDisplayName, [LibraryDescription] = @LibraryDescription, [LibraryFolder] = @LibraryFolder, [LibraryAccess] = @LibraryAccess, [LibraryGroupID] = @LibraryGroupID, [LibrarySiteID] = @LibrarySiteID, [LibraryGUID] = @LibraryGUID, [LibraryLastModified] = @LibraryLastModified, [LibraryTeaserPath] = @LibraryTeaserPath WHERE [LibraryID] = @LibraryID', 0, 1934, 0, '20081229 09:07:11', 'eebf5a57-a667-458e-abe3-3df68e40575c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7277, N'delete', 0, N'DELETE FROM Community_Invitation WHERE [InvitationID] = @ID', 0, 1962, 0, '20081229 09:07:09', 'bb9dcc01-39b2-4898-843d-e5092d6348e2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7278, N'insert', 0, N'INSERT INTO Community_Invitation ([InvitedUserID], [InvitedByUserID], [InvitationGroupID], [InvitationCreated], [InvitationValidTo], [InvitationComment], [InvitationGUID], [InvitationLastModified], [InvitationUserEmail] ) VALUES ( @InvitedUserID, @InvitedByUserID, @InvitationGroupID, @InvitationCreated, @InvitationValidTo, @InvitationComment, @InvitationGUID, @InvitationLastModified, @InvitationUserEmail); SELECT SCOPE_IDENTITY() AS [InvitationID]', 1, 1962, 0, '20081229 09:07:09', 'a7987421-12e0-4378-b90f-59dcdeb22ed9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7279, N'update', 0, N'UPDATE Community_Invitation SET [InvitedUserID] = @InvitedUserID, [InvitedByUserID] = @InvitedByUserID, [InvitationGroupID] = @InvitationGroupID, [InvitationCreated] = @InvitationCreated, [InvitationValidTo] = @InvitationValidTo, [InvitationComment] = @InvitationComment, [InvitationGUID] = @InvitationGUID, [InvitationLastModified] = @InvitationLastModified, [InvitationUserEmail] = @InvitationUserEmail WHERE [InvitationID] = @InvitationID', 0, 1962, 0, '20081229 09:07:09', '7991eb9a-f772-42fa-83cf-4acac6ca28a4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7567, N'removedependencies', 1, N'Proc_CMS_TagGroup_RemoveDependencies', 1, 1736, 0, '20081107 19:58:34', '95655d5f-77ba-4a51-86e1-caa64650ad83', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7568, N'RemoveDependencies', 1, N'Proc_Community_GroupMember_RemoveDependencies', 0, 1749, 0, '20081110 10:00:13', 'de5c03a3-af12-4f37-88fd-05dd5a89dd81', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7575, N'RemoveDependencies', 1, N'Proc_CMS_TimeZone_RemoveDependencies', 0, 1747, 0, '20081110 13:37:12', '7828fcf0-1b94-4d10-bcbf-bcba70a1af51', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7621, N'removedependencies', 1, N'Proc_Media_Library_RemoveDependencies', 0, 1934, 0, '20081112 14:51:05', 'dbc722c5-c16d-412b-9a8a-fe4bb4062376', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7644, N'deletewhere', 0, N'DELETE FROM Community_Invitation WHERE ##WHERE##', 0, 1962, 0, '20081119 17:12:29', '327466db-33a1-482d-ac1b-02a934a431f3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7645, N'UpdateUserCounts', 1, N'Proc_CMS_User_UpdateUserCounts', 0, 59, 0, '20081123 10:50:25', 'b314eb8d-9dd8-4239-a920-ce707d046813', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7674, N'changestatus', 0, N'UPDATE CMS_Email SET [EmailStatus] = @Status WHERE ##WHERE##', 1, 1809, 0, '20081125 16:25:44', '59dc0513-5cd4-48d8-9f2b-a2b1a2e763fe', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7675, N'SearchForum', 0, N'SELECT ##TOPN## [View_Forums_GroupForumPost_Joined].*, [CMS_User].UserName, [CMS_UserSettings].UserForumPosts, [CMS_UserSettings].UserActivityPoints,[CMS_UserSettings].UserGender, [CMS_UserSettings].UserPicture, [CMS_Badge].BadgeDisplayName, [CMS_Badge].BadgeImageURL, [CMS_Avatar].AvatarGUID, [CMS_Avatar].AvatarID
FROM [View_Forums_GroupForumPost_Joined] 
LEFT JOIN CMS_User ON [CMS_User].UserID = [View_Forums_GroupForumPost_Joined].PostUserID
LEFT JOIN CMS_UserSettings ON [CMS_UserSettings].UserSettingsUserID = [View_Forums_GroupForumPost_Joined].PostUserID
LEFT JOIN CMS_Badge ON [CMS_Badge].BadgeID = [CMS_UserSettings].UserBadgeID
LEFT JOIN CMS_Avatar ON [CMS_Avatar].AvatarID = [CMS_UserSettings].UserAvatarID
WHERE (##WHERE##) ORDER BY ##ORDERBY##', 0, 1123, 0, '20100414 08:22:22', '8159247c-a3bf-4944-aa10-48f47edd65e8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7677, N'actualizecount', 0, N'UPDATE CMS_Category SET CategoryCount = (SELECT Count(CategoryID) FROM CMS_DocumentCount WHERE CategoryID = @CategoryId)', 0, 1721, 0, '20081127 16:08:53', 'a34fe128-c37c-4ea5-831d-4988eeff5e21', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7740, N'delete', 0, N'DELETE FROM Community_GroupRolePermission WHERE [GroupID] = @GroupID AND [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 1995, 0, '20081229 09:07:08', '00423d06-3e23-4f43-ba70-dd3230757349', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7741, N'insert', 0, N'INSERT INTO Community_GroupRolePermission ([GroupID], [RoleID], [PermissionID] ) VALUES ( @GroupID, @RoleID, @PermissionID);', 1, 1995, 0, '20081229 09:07:08', '460494c8-88ee-4456-b5bc-5c9ffbbb59f3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7742, N'update', 0, N'SELECT NULL', 0, 1995, 0, '20081229 09:07:08', '86a6dda3-3f81-416f-acde-5c33045b5f53', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7745, N'getPermissionMatrix', 0, N'SELECT ##TOPN## Matrix.##COLUMNS##, CASE WHEN Community_GroupRolePermission.RoleID IS NULL THEN 0 ELSE 1 END AS Allowed FROM (SELECT CMS_Permission.PermissionID, CMS_Permission.PermissionDisplayName, CMS_Permission.PermissionName, CMS_Permission.PermissionDescription, CMS_Role.RoleID, CMS_Role.Rolename, CMS_Role.RoleDisplayName FROM CMS_Permission, CMS_Role WHERE ResourceID = @ID AND RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND (@SiteID = 0 OR SiteID = @SiteID))) Matrix LEFT JOIN Community_GroupRolePermission ON (Matrix.PermissionID = Community_GroupRolePermission.PermissionID AND Community_GroupRolePermission.RoleID = Matrix.RoleID AND Community_GroupRolePermission.GroupID= @GroupID) ORDER BY ##ORDERBY##', 0, 1995, 0, '20100201 08:33:26', '0a836575-0618-4766-af01-c92c685118ad', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7878, N'delete', 0, N'DELETE FROM Blog_PostSubscription WHERE [SubscriptionID] = @ID', 0, 2018, 0, '20081229 09:06:57', '4e35923b-8d4f-4f5e-b386-d5c955b4d6c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7879, N'insert', 0, N'INSERT INTO Blog_PostSubscription ([SubscriptionPostDocumentID], [SubscriptionUserID], [SubscriptionEmail], [SubscriptionLastModified], [SubscriptionGUID] ) VALUES ( @SubscriptionPostDocumentID, @SubscriptionUserID, @SubscriptionEmail, @SubscriptionLastModified, @SubscriptionGUID); SELECT SCOPE_IDENTITY() AS [SubscriptionID]', 1, 2018, 0, '20081229 09:06:57', 'dc6f80ea-e55a-4c73-bdb3-a3ab5188ce17', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7880, N'update', 0, N'UPDATE Blog_PostSubscription SET [SubscriptionPostDocumentID] = @SubscriptionPostDocumentID, [SubscriptionUserID] = @SubscriptionUserID, [SubscriptionEmail] = @SubscriptionEmail, [SubscriptionLastModified] = @SubscriptionLastModified, [SubscriptionGUID] = @SubscriptionGUID WHERE [SubscriptionID] = @SubscriptionID', 0, 2018, 0, '20081229 09:06:57', '4700b063-6eea-45b3-83a6-2301c6549ed0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9245, N'movenodespecific', 1, N'Proc_CMS_Tree_MoveNodeSpecific', 1, 143, 0, '20091006 17:52:22', '326b9708-d1d2-449e-9e26-65b6975ad527', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9818, N'UpdatePostCounts', 1, N'Proc_Forums_ForumPost_UpdatePostCounts', 0, 1123, 0, '20100126 15:47:00', '5e8a60ff-6c49-4113-a29f-3739c530b2c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9197, N'selectsitelist', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Site_DocumentCount WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 52, 0, '20100426 15:52:02', '5df25a0b-d593-4e35-a223-a838959908eb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1900, N'ChangeSiteDefaultCulture', 0, N'UPDATE CMS_Document SET [DocumentCulture]=@NewCulture WHERE DocumentID IN (SELECT DocumentID FROM View_CMS_Tree_Joined WHERE [DocumentCulture]=@OldCulture AND [SiteName]=@SiteName)', 0, 143, 0, '20100513 13:47:28', 'd60e535a-b195-4958-ac67-2edd09ad291f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (354, N'delete', 0, N'DELETE FROM CMS_Culture WHERE [CultureID] = @ID', 0, 1, 0, '20081229 09:06:58', '5a85ac7a-bd29-4549-8a03-43fa84b79e48', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (351, N'insert', 0, N'INSERT INTO CMS_Culture ([CultureName], [CultureCode], [CultureShortName], [CultureGUID], [CultureLastModified], [CultureAlias] ) VALUES ( @CultureName, @CultureCode, @CultureShortName, @CultureGUID, @CultureLastModified, @CultureAlias); SELECT SCOPE_IDENTITY() AS [CultureID]', 1, 1, 0, '20081229 09:06:58', '8f63c7a1-4dc7-4f77-9da1-3af2b5a0b51a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (349, N'update', 0, N'UPDATE CMS_Culture SET [CultureName] = @CultureName, [CultureCode] = @CultureCode, [CultureShortName] = @CultureShortName, [CultureGUID] = @CultureGUID, [CultureLastModified] = @CultureLastModified, [CultureAlias] = @CultureAlias WHERE [CultureID] = @CultureID', 0, 1, 0, '20081229 09:06:58', '1ffb64ab-2de9-4ddb-a1eb-97e51d33f1ab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2301, N'changeaclid', 1, N'Proc_CMS_Tree_ChangeACLID', 1, 143, 0, '20100603 12:37:16', '692825fc-b56e-466e-a1d1-0649c986aa56', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10254, N'deletearchived', 1, N'Proc_CMS_Email_DeleteArchived', 0, 1809, 0, '20100609 09:52:53', '4b000655-131a-42c5-938a-329837e0828f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2569, N'delete', 0, N'DELETE FROM Staging_Task WHERE [TaskID] = @ID', 0, 1134, 0, '20100322 15:42:01', '3c739a86-6e0f-476a-86bd-4b46112842b7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2570, N'insert', 0, N'INSERT INTO Staging_Task ([TaskSiteID], [TaskDocumentID], [TaskNodeAliasPath], [TaskTitle], [TaskData], [TaskTime], [TaskType], [TaskObjectType], [TaskObjectID], [TaskRunning], [TaskNodeID], [TaskServers] ) VALUES ( @TaskSiteID, @TaskDocumentID, @TaskNodeAliasPath, @TaskTitle, @TaskData, @TaskTime, @TaskType, @TaskObjectType, @TaskObjectID, @TaskRunning, @TaskNodeID, @TaskServers); SELECT SCOPE_IDENTITY() AS [TaskID]', 1, 1134, 0, '20100322 15:42:01', '3ab77758-35d5-4fda-94de-99bc457b5c87', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2571, N'update', 0, N'UPDATE Staging_Task SET [TaskSiteID] = @TaskSiteID, [TaskDocumentID] = @TaskDocumentID, [TaskNodeAliasPath] = @TaskNodeAliasPath, [TaskTitle] = @TaskTitle, [TaskData] = @TaskData, [TaskTime] = @TaskTime, [TaskType] = @TaskType, [TaskObjectType] = @TaskObjectType, [TaskObjectID] = @TaskObjectID, [TaskRunning] = @TaskRunning, [TaskNodeID] = @TaskNodeID, [TaskServers] = @TaskServers WHERE [TaskID] = @TaskID', 0, 1134, 0, '20100322 15:42:02', '4ef18bfe-0eef-4403-b5bc-8bb0779fdefd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (495, N'removeaclid', 1, N'Proc_CMS_ACL_RemoveACLID', 1, 233, 0, '20100616 22:26:30', '922c79cc-e5ff-48c5-a16d-fac56a81b3b5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10323, N'log', 1, N'Proc_Newsletter_OpenedEmail_Log', 0, 2429, 0, '20100702 12:42:59', '868b8b31-d163-4599-ba9c-b98be4165c11', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10311, N'delete', 0, N'DELETE FROM [Newsletter_OpenedEmail] WHERE [SubscriberID] = @SubscriberID AND [IssueID] = @IssueID', 0, 2429, 0, '20100709 16:32:45', '1c5ff81e-ce81-4f21-93ab-339e48546052', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10312, N'insert', 0, N'INSERT INTO [Newsletter_OpenedEmail] ([SubscriberID], [IssueID], [OpenedWhen]) VALUES (@SubscriberID, @IssueID, @OpenedWhen)', 1, 2429, 0, '20100709 16:32:54', '59f54ce6-31d1-4da8-9b8a-27272dce6c7d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10310, N'select', 0, N'SELECT ##COLUMNS## FROM [Newsletter_OpenedEmail] WHERE [SubscriberID] = @SubscriberID AND [IssueID] = @IssueID', 0, 2429, 0, '20100709 16:33:04', 'd2fe2037-22e1-4939-bcb3-aa285a1ed4e0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10314, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM [Newsletter_OpenedEmail] WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 2429, 0, '20100709 16:33:13', '2684ceb7-df99-4ccc-a41f-0f7a971808e8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10313, N'update', 0, N'UPDATE [Newsletter_OpenedEmail] SET [SubscriberID] = @SubscriberID, [IssueID] = @IssueID, [OpenedWhen] = @OpenedWhen WHERE [SubscriberID] = @SubscriberID AND [IssueID] = @IssueID', 0, 2429, 0, '20100709 16:33:31', '641160af-79ed-45a5-9575-d0cbba68cd90', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3839, N'delete', 0, N'DELETE FROM Reporting_ReportCategory WHERE [CategoryID] = @ID', 0, 1431, 0, '20081229 09:07:21', '939e048f-1ba8-458d-af63-a6c92657ec94', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3840, N'insert', 0, N'INSERT INTO Reporting_ReportCategory ([CategoryDisplayName], [CategoryCodeName], [CategoryGUID], [CategoryLastModified], [CategoryParentID], [CategoryImagePath], [CategoryPath], [CategoryOrder], [CategoryLevel], [CategoryChildCount], [CategoryReportChildCount] ) VALUES ( @CategoryDisplayName, @CategoryCodeName, @CategoryGUID, @CategoryLastModified, @CategoryParentID, @CategoryImagePath, @CategoryPath, @CategoryOrder, @CategoryLevel, @CategoryChildCount, @CategoryReportChildCount); SELECT SCOPE_IDENTITY() AS [CategoryID]', 1, 1431, 0, '20081229 09:07:21', '70499137-916d-4fff-b555-96d1597efdc6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3841, N'update', 0, N'UPDATE Reporting_ReportCategory SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryCodeName] = @CategoryCodeName, [CategoryGUID] = @CategoryGUID, [CategoryLastModified] = @CategoryLastModified, [CategoryParentID] = @CategoryParentID, [CategoryImagePath] = @CategoryImagePath, [CategoryPath] = @CategoryPath, [CategoryOrder] = @CategoryOrder, [CategoryLevel] = @CategoryLevel, [CategoryChildCount] = @CategoryChildCount, [CategoryReportChildCount] = @CategoryReportChildCount WHERE [CategoryID] = @CategoryID', 0, 1431, 0, '20081229 09:07:21', 'bfb3fbd3-b9a9-4d9a-aa26-aebc5248d302', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5235, N'delete', 0, N'DELETE FROM CMS_SettingsCategory WHERE [CategoryID] = @ID', 0, 1649, 0, '20081229 09:07:23', 'cd7c67bd-c435-4ebd-959c-614d94fdfc92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5236, N'insert', 0, N'INSERT INTO CMS_SettingsCategory ([CategoryDisplayName], [CategoryOrder], [CategoryName], [CategoryParentID], [CategoryIDPath], [CategoryLevel], [CategoryChildCount], [CategoryIconPath], [CategoryIsGroup], [CategoryIsCustom] ) VALUES ( @CategoryDisplayName, @CategoryOrder, @CategoryName, @CategoryParentID, @CategoryIDPath, @CategoryLevel, @CategoryChildCount, @CategoryIconPath, @CategoryIsGroup, @CategoryIsCustom); SELECT SCOPE_IDENTITY() AS [CategoryID]', 1, 1649, 0, '20081229 09:07:23', '6645ef27-6f68-40c1-9dde-78db0c17a073', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5237, N'update', 0, N'UPDATE CMS_SettingsCategory SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryOrder] = @CategoryOrder, [CategoryName] = @CategoryName, [CategoryParentID] = @CategoryParentID, [CategoryIDPath] = @CategoryIDPath, [CategoryLevel] = @CategoryLevel, [CategoryChildCount] = @CategoryChildCount, [CategoryIconPath] = @CategoryIconPath, [CategoryIsGroup] = @CategoryIsGroup, [CategoryIsCustom] = @CategoryIsCustom WHERE [CategoryID] = @CategoryID', 0, 1649, 0, '20081229 09:07:23', '5f64b756-f415-4046-9c63-a92703949c84', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10464, N'movekeydownbyid', 1, N'Proc_CMS_SettingsKey_MoveKeyDownByID', 0, 1611, 0, '20100723 12:56:13', 'd06aae77-9d2e-4b93-8854-b538859a24e4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10465, N'movekeyupbyid', 1, N'Proc_CMS_SettingsKey_MoveKeyUpByID', 0, 1611, 0, '20100723 12:56:55', '5ade6574-8251-4d4a-a435-1143038bcd75', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10466, N'initkeybyidorders', 1, N'Proc_CMS_SettingsKey_InitKeyByIDOrders', 0, 1611, 0, '20100723 13:00:15', '8cbc3eef-76bb-4c6d-a70e-d94cda73d681', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10472, N'unsubscribe', 1, N'Proc_Newsletter_Issue_Unsubscribe', 0, 907, 0, '20100723 15:45:18', '36820183-b3bb-4db6-8d99-ff8fadbe8347', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10525, N'addsentemails', 1, N'Proc_Newsletter_Issue_AddSentEmails', 0, 907, 0, '20100730 14:39:26', '61118d4e-27c5-41f0-a177-9c1b546d7ff2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10451, N'removedependencies', 1, N'Proc_Newsletter_Subscriber_RemoveDependencies', 0, 908, 0, '20100720 12:58:26', '5073b3de-6e2d-452e-b47c-d170422c9185', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2792, N'CheckDependencies', 0, N'SELECT TOP 1 OrderItemSKUID FROM COM_OrderItem WHERE OrderItemSKUID = @ID UNION SELECT TOP 1 SKUID FROM COM_ShoppingCartSKU WHERE SKUID=@ID', 0, 1159, 0, '20100322 15:11:45', 'bb4d0d4d-640c-426a-aa1e-36594bbb9481', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2356, N'searchtree', 0, N'SELECT ##COLUMNS##, View_CMS_Tree_Joined.DocumentName AS SearchResultName FROM View_CMS_Tree_Joined  WHERE (DocumentName LIKE N''%'' + @Expression + N''%'' OR DocumentContent LIKE N''%'' + @Expression + N''%'') AND ClassName = ''CMS.Root'' AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1095, 0, '20090422 16:14:08', 'eca3e8a7-b657-410d-b725-60572c95028d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6687, N'delete', 0, N'DELETE FROM CMS_Personalization WHERE [PersonalizationID] = @ID', 0, 1841, 0, '20091016 11:33:52', 'b361275c-df97-4ad3-b5db-4c49a3874271', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6688, N'insert', 0, N'INSERT INTO CMS_Personalization ([PersonalizationGUID], [PersonalizationLastModified], [PersonalizationUserID], [PersonalizationDocumentID], [PersonalizationWebParts], [PersonalizationDashboardName], [PersonalizationSiteID] ) VALUES ( @PersonalizationGUID, @PersonalizationLastModified, @PersonalizationUserID, @PersonalizationDocumentID, @PersonalizationWebParts, @PersonalizationDashboardName, @PersonalizationSiteID); SELECT SCOPE_IDENTITY() AS [PersonalizationID]', 1, 1841, 0, '20091016 11:33:52', '1998cd59-9411-4267-8bce-f071bb783cff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6689, N'update', 0, N'UPDATE CMS_Personalization SET [PersonalizationGUID] = @PersonalizationGUID, [PersonalizationLastModified] = @PersonalizationLastModified, [PersonalizationUserID] = @PersonalizationUserID, [PersonalizationDocumentID] = @PersonalizationDocumentID, [PersonalizationWebParts] = @PersonalizationWebParts, [PersonalizationDashboardName] = @PersonalizationDashboardName, [PersonalizationSiteID] = @PersonalizationSiteID WHERE [PersonalizationID] = @PersonalizationID', 0, 1841, 0, '20091016 11:33:52', '9be84980-8236-4dec-adf8-a33069857b64', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (204, N'deleteolderlogs', 0, N'DELETE FROM [CMS_EventLog] WHERE ([EventID] NOT IN (SELECT ##TOPN## [EventID] FROM [CMS_EventLog] WITH (NOLOCK) WHERE ##WHERE## ORDER BY ##ORDERBY##)) AND (##WHERE##)', 1, 140, 0, '20100816 11:05:20', '5e4c7921-7582-4aee-a537-79f862ffeb54', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4842, N'delete', 0, N'DELETE FROM CMS_SettingsKey WHERE [KeyID] = @ID', 0, 1611, 0, '20091026 14:34:13', '351fc46f-5235-4e0d-9a90-51e9b4bfa861', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4843, N'insert', 0, N'INSERT INTO CMS_SettingsKey ([KeyName], [KeyDisplayName], [KeyDescription], [KeyValue], [KeyType], [KeyCategoryID], [SiteID], [KeyGUID], [KeyLastModified], [KeyOrder], [KeyDefaultValue], [KeyValidation], [KeyEditingControlPath], [KeyLoadGeneration], [KeyIsGlobal], [KeyIsCustom], [KeyIsHidden] ) VALUES ( @KeyName, @KeyDisplayName, @KeyDescription, @KeyValue, @KeyType, @KeyCategoryID, @SiteID, @KeyGUID, @KeyLastModified, @KeyOrder, @KeyDefaultValue, @KeyValidation, @KeyEditingControlPath, @KeyLoadGeneration, @KeyIsGlobal, @KeyIsCustom, @KeyIsHidden); SELECT SCOPE_IDENTITY() AS [KeyID]', 1, 1611, 0, '20091026 14:34:13', '5d0123b5-0877-4385-8e33-206564ffac0b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4844, N'update', 0, N'UPDATE CMS_SettingsKey SET [KeyName] = @KeyName, [KeyDisplayName] = @KeyDisplayName, [KeyDescription] = @KeyDescription, [KeyValue] = @KeyValue, [KeyType] = @KeyType, [KeyCategoryID] = @KeyCategoryID, [SiteID] = @SiteID, [KeyGUID] = @KeyGUID, [KeyLastModified] = @KeyLastModified, [KeyOrder] = @KeyOrder, [KeyDefaultValue] = @KeyDefaultValue, [KeyValidation] = @KeyValidation, [KeyEditingControlPath] = @KeyEditingControlPath, [KeyLoadGeneration] = @KeyLoadGeneration, [KeyIsGlobal] = @KeyIsGlobal, [KeyIsCustom] = @KeyIsCustom, [KeyIsHidden] = @KeyIsHidden WHERE [KeyID] = @KeyID', 0, 1611, 0, '20091026 14:34:13', '48bcc8e5-9840-4d02-a62c-4c52f6219da3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1385, N'delete', 0, N'DELETE FROM CMS_WebPartContainer WHERE [ContainerID] = @ID', 0, 929, 0, '20081229 09:07:40', 'ed6461f2-9d7a-4f6b-a378-e3e37bb66297', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1386, N'insert', 0, N'INSERT INTO CMS_WebPartContainer ([ContainerDisplayName], [ContainerName], [ContainerTextBefore], [ContainerTextAfter], [ContainerGUID], [ContainerLastModified], [ContainerCSS] ) VALUES ( @ContainerDisplayName, @ContainerName, @ContainerTextBefore, @ContainerTextAfter, @ContainerGUID, @ContainerLastModified, @ContainerCSS); SELECT SCOPE_IDENTITY() AS [ContainerID]', 1, 929, 0, '20081229 09:07:40', 'b108d672-ddbb-417f-967f-095808b07647', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1387, N'update', 0, N'UPDATE CMS_WebPartContainer SET [ContainerDisplayName] = @ContainerDisplayName, [ContainerName] = @ContainerName, [ContainerTextBefore] = @ContainerTextBefore, [ContainerTextAfter] = @ContainerTextAfter, [ContainerGUID] = @ContainerGUID, [ContainerLastModified] = @ContainerLastModified, [ContainerCSS] = @ContainerCSS WHERE [ContainerID] = @ContainerID', 0, 929, 0, '20081229 09:07:40', '7ac645b2-4d70-42a2-8be5-439a3c02e6ba', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (481, N'deletebyaclid', 0, N'DELETE FROM CMS_ACLItem WHERE ACLID = @ACLID', 1, 225, 0, '20100826 18:17:46', '041a1bb2-2295-4b04-b6f0-0483ce0eed36', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (392, N'delete', 0, N'DELETE FROM CMS_Workflow WHERE [WorkflowID] = @ID', 0, 171, 0, '20081229 09:07:41', 'ec9aaa48-0cac-45f0-b205-46c993beeccf', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (397, N'insert', 0, N'INSERT INTO CMS_Workflow ([WorkflowDisplayName], [WorkflowName], [WorkflowGUID], [WorkflowLastModified], [WorkflowAutoPublishChanges], [WorkflowUseCheckinCheckout] ) VALUES ( @WorkflowDisplayName, @WorkflowName, @WorkflowGUID, @WorkflowLastModified, @WorkflowAutoPublishChanges, @WorkflowUseCheckinCheckout); SELECT SCOPE_IDENTITY() AS [WorkflowID]', 1, 171, 0, '20081229 09:07:41', '31cf26bc-28be-4374-9062-a5b5428f3879', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (399, N'update', 0, N'UPDATE CMS_Workflow SET [WorkflowDisplayName] = @WorkflowDisplayName, [WorkflowName] = @WorkflowName, [WorkflowGUID] = @WorkflowGUID, [WorkflowLastModified] = @WorkflowLastModified, [WorkflowAutoPublishChanges] = @WorkflowAutoPublishChanges, [WorkflowUseCheckinCheckout] = @WorkflowUseCheckinCheckout WHERE [WorkflowID] = @WorkflowID', 0, 171, 0, '20081229 09:07:41', '7fa0b83e-016b-4e04-83be-9b7dd58a1fc8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3595, N'delete', 0, N'DELETE FROM Analytics_DayHits WHERE [HitsID] = @ID', 0, 1368, 0, '20081229 09:06:53', '39b63e35-98e0-4910-aa5d-40f52c61ad92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3596, N'insert', 0, N'INSERT INTO Analytics_DayHits ([HitsStatisticsID], [HitsStartTime], [HitsEndTime], [HitsCount], [HitsValue] ) VALUES ( @HitsStatisticsID, @HitsStartTime, @HitsEndTime, @HitsCount, @HitsValue); SELECT SCOPE_IDENTITY() AS [HitsID]', 1, 1368, 0, '20081229 09:06:53', '9fd41532-0ab4-4222-931d-58d3ca754d4a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3597, N'update', 0, N'UPDATE Analytics_DayHits SET [HitsStatisticsID] = @HitsStatisticsID, [HitsStartTime] = @HitsStartTime, [HitsEndTime] = @HitsEndTime, [HitsCount] = @HitsCount, [HitsValue] = @HitsValue WHERE [HitsID] = @HitsID', 0, 1368, 0, '20081229 09:06:53', '13277690-9e37-4727-b624-bc1f4526c0b0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3585, N'delete', 0, N'DELETE FROM Analytics_HourHits WHERE [HitsID] = @ID', 0, 1367, 0, '20081229 09:06:53', '955f6bc8-ee3f-4f37-9967-221286ac7b31', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3586, N'insert', 0, N'INSERT INTO Analytics_HourHits ([HitsStatisticsID], [HitsStartTime], [HitsEndTime], [HitsCount], [HitsValue] ) VALUES ( @HitsStatisticsID, @HitsStartTime, @HitsEndTime, @HitsCount, @HitsValue); SELECT SCOPE_IDENTITY() AS [HitsID]', 1, 1367, 0, '20081229 09:06:53', '35efb40e-8512-4ef0-848e-a22aa1edaee2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3587, N'update', 0, N'UPDATE Analytics_HourHits SET [HitsStatisticsID] = @HitsStatisticsID, [HitsStartTime] = @HitsStartTime, [HitsEndTime] = @HitsEndTime, [HitsCount] = @HitsCount, [HitsValue] = @HitsValue WHERE [HitsID] = @HitsID', 0, 1367, 0, '20081229 09:06:53', '42284adb-3666-41d1-a2ac-2feb4dae1d38', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3600, N'delete', 0, N'DELETE FROM Analytics_MonthHits WHERE [HitsID] = @ID', 0, 1369, 0, '20081229 09:06:53', '3024dfef-b4ae-4338-b671-1383fd33664b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3601, N'insert', 0, N'INSERT INTO Analytics_MonthHits ([HitsStatisticsID], [HitsStartTime], [HitsEndTime], [HitsCount], [HitsValue] ) VALUES ( @HitsStatisticsID, @HitsStartTime, @HitsEndTime, @HitsCount, @HitsValue); SELECT SCOPE_IDENTITY() AS [HitsID]', 1, 1369, 0, '20081229 09:06:53', '89782ef1-12b7-425d-b637-83bf2247e114', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3602, N'update', 0, N'UPDATE Analytics_MonthHits SET [HitsStatisticsID] = @HitsStatisticsID, [HitsStartTime] = @HitsStartTime, [HitsEndTime] = @HitsEndTime, [HitsCount] = @HitsCount, [HitsValue] = @HitsValue WHERE [HitsID] = @HitsID', 0, 1369, 0, '20081229 09:06:53', '7e1ef538-a6e0-4644-ab87-a7d97671fb7e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3605, N'delete', 0, N'DELETE FROM Analytics_WeekHits WHERE [HitsID] = @ID', 0, 1370, 0, '20081229 09:06:53', 'c2df5f2b-989b-4afe-9662-03ab153e06df', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3606, N'insert', 0, N'INSERT INTO Analytics_WeekHits ([HitsStatisticsID], [HitsStartTime], [HitsEndTime], [HitsCount], [HitsValue] ) VALUES ( @HitsStatisticsID, @HitsStartTime, @HitsEndTime, @HitsCount, @HitsValue); SELECT SCOPE_IDENTITY() AS [HitsID]', 1, 1370, 0, '20081229 09:06:53', '49f55821-7eff-4e72-9043-110b92d1b498', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3607, N'update', 0, N'UPDATE Analytics_WeekHits SET [HitsStatisticsID] = @HitsStatisticsID, [HitsStartTime] = @HitsStartTime, [HitsEndTime] = @HitsEndTime, [HitsCount] = @HitsCount, [HitsValue] = @HitsValue WHERE [HitsID] = @HitsID', 0, 1370, 0, '20081229 09:06:53', '7f355ace-ee50-42b5-a068-e684587eb4d4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3610, N'delete', 0, N'DELETE FROM Analytics_YearHits WHERE [HitsID] = @ID', 0, 1371, 0, '20081229 09:06:53', 'e2f670eb-c7e1-4be1-a9ba-c1471b7adeae', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3611, N'insert', 0, N'INSERT INTO Analytics_YearHits ([HitsStatisticsID], [HitsStartTime], [HitsEndTime], [HitsCount], [HitsValue] ) VALUES ( @HitsStatisticsID, @HitsStartTime, @HitsEndTime, @HitsCount, @HitsValue); SELECT SCOPE_IDENTITY() AS [HitsID]', 1, 1371, 0, '20081229 09:06:53', '07af6177-4225-41ef-994d-3dbf636be266', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3612, N'update', 0, N'UPDATE Analytics_YearHits SET [HitsStatisticsID] = @HitsStatisticsID, [HitsStartTime] = @HitsStartTime, [HitsEndTime] = @HitsEndTime, [HitsCount] = @HitsCount, [HitsValue] = @HitsValue WHERE [HitsID] = @HitsID', 0, 1371, 0, '20081229 09:06:53', '65fbf0a7-6b5b-4f28-83db-7ac1db58ab42', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (456, N'delete', 0, N'DELETE FROM CMS_ACL WHERE [ACLID] = @ID', 0, 233, 0, '20081229 09:06:53', 'ee7707f0-5fca-459b-98c4-9be1e69794f8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (457, N'insert', 0, N'INSERT INTO CMS_ACL ([ACLInheritedACLs], [ACLOwnerNodeID], [ACLGUID], [ACLLastModified], [ACLSiteID] ) VALUES ( @ACLInheritedACLs, @ACLOwnerNodeID, @ACLGUID, @ACLLastModified, @ACLSiteID); SELECT SCOPE_IDENTITY() AS [ACLID]', 1, 233, 0, '20081229 09:06:53', 'ef2e2475-d095-43fc-a2c4-42ad80aef9ab', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (458, N'update', 0, N'UPDATE CMS_ACL SET [ACLInheritedACLs] = @ACLInheritedACLs, [ACLOwnerNodeID] = @ACLOwnerNodeID, [ACLGUID] = @ACLGUID, [ACLLastModified] = @ACLLastModified, [ACLSiteID] = @ACLSiteID WHERE [ACLID] = @ACLID', 0, 233, 0, '20081229 09:06:53', '6a6ad038-82fa-4b7c-8f59-d9337cc896b3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2558, N'delete', 0, N'DELETE FROM Staging_Server WHERE [ServerID] = @ID', 0, 1132, 0, '20100907 09:43:59', 'b3e91226-c0df-4530-b5a2-9703750ee44d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2559, N'insert', 0, N'INSERT INTO Staging_Server ([ServerName], [ServerDisplayName], [ServerSiteID], [ServerURL], [ServerEnabled], [ServerAuthentication], [ServerUsername], [ServerPassword], [ServerX509ClientKeyID], [ServerX509ServerKeyID], [ServerGUID], [ServerLastModified] ) VALUES ( @ServerName, @ServerDisplayName, @ServerSiteID, @ServerURL, @ServerEnabled, @ServerAuthentication, @ServerUsername, @ServerPassword, @ServerX509ClientKeyID, @ServerX509ServerKeyID, @ServerGUID, @ServerLastModified); SELECT SCOPE_IDENTITY() AS [ServerID]', 1, 1132, 0, '20100907 09:46:17', '249b703b-5a99-42f1-a5a5-1d1633616a68', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2560, N'update', 0, N'UPDATE Staging_Server SET [ServerName] = @ServerName, [ServerDisplayName] = @ServerDisplayName, [ServerSiteID] = @ServerSiteID, [ServerURL] = @ServerURL, [ServerEnabled] = @ServerEnabled, [ServerAuthentication] = @ServerAuthentication, [ServerUsername] = @ServerUsername, [ServerPassword] = @ServerPassword, [ServerX509ClientKeyID] = @ServerX509ClientKeyID, [ServerX509ServerKeyID] = @ServerX509ServerKeyID, [ServerGUID] = @ServerGUID, [ServerLastModified] = @ServerLastModified WHERE [ServerID] = @ServerID', 0, 1132, 0, '20100907 09:47:19', 'c59b6aaf-8f0f-41c1-9472-70929c80a821', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (570, N'movestepdown', 1, N'Proc_CMS_WorkflowStep_MoveStepDown', 1, 172, 0, '20100907 10:00:28', 'e9550587-017c-4a26-a2a2-10b378790ebe', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (569, N'movestepup', 1, N'Proc_CMS_WorkflowStep_MoveStepUp', 1, 172, 0, '20100907 10:00:36', '2f7cded0-9ca1-485d-88a3-389eaa9b18ea', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (568, N'initsteporders', 1, N'Proc_CMS_WorkflowStep_InitStepOrders', 1, 172, 0, '20100907 10:01:03', 'd1540ab5-436f-469d-bfa4-7a643a0bc8d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (591, N'removeRoleFromStep', 0, N'DELETE FROM CMS_WorkflowStepRoles WHERE RoleID=@RoleID AND StepID=@StepID', 1, 172, 0, '20100907 10:53:15', 'b678e59a-a433-46dd-aed1-b8bfad868180', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3580, N'delete', 0, N'DELETE FROM Analytics_Statistics WHERE [StatisticsID] = @ID', 0, 1366, 0, '20081229 09:06:53', '9d8f4f13-ae8c-4615-a57e-c92eafe84553', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3581, N'insert', 0, N'INSERT INTO Analytics_Statistics ([StatisticsSiteID], [StatisticsCode], [StatisticsObjectName], [StatisticsObjectID], [StatisticsObjectCulture] ) VALUES ( @StatisticsSiteID, @StatisticsCode, @StatisticsObjectName, @StatisticsObjectID, @StatisticsObjectCulture); SELECT SCOPE_IDENTITY() AS [StatisticsID]', 1, 1366, 0, '20081229 09:06:53', 'b9966be5-a325-4ec9-a6f1-3713b204a5e2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3582, N'update', 0, N'UPDATE Analytics_Statistics SET [StatisticsSiteID] = @StatisticsSiteID, [StatisticsCode] = @StatisticsCode, [StatisticsObjectName] = @StatisticsObjectName, [StatisticsObjectID] = @StatisticsObjectID, [StatisticsObjectCulture] = @StatisticsObjectCulture WHERE [StatisticsID] = @StatisticsID', 0, 1366, 0, '20081229 09:06:53', '9a35878b-2091-40c9-a2e5-1a8c180349ae', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1259, N'delete', 0, N'DELETE FROM CMS_InlineControl WHERE [ControlID] = @ID', 0, 877, 0, '20081229 09:07:09', '3bee3da6-b868-48f7-88eb-c60132afbe96', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1260, N'insert', 0, N'INSERT INTO CMS_InlineControl ([ControlDisplayName], [ControlName], [ControlParameterName], [ControlDescription], [ControlGUID], [ControlLastModified], [ControlFileName], [ControlProperties], [ControlResourceID] ) VALUES ( @ControlDisplayName, @ControlName, @ControlParameterName, @ControlDescription, @ControlGUID, @ControlLastModified, @ControlFileName, @ControlProperties, @ControlResourceID); SELECT SCOPE_IDENTITY() AS [ControlID]', 1, 877, 0, '20081229 09:07:09', '3e265c35-8034-45dd-aec6-042d0f2ca47c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1261, N'update', 0, N'UPDATE CMS_InlineControl SET [ControlDisplayName] = @ControlDisplayName, [ControlName] = @ControlName, [ControlParameterName] = @ControlParameterName, [ControlDescription] = @ControlDescription, [ControlGUID] = @ControlGUID, [ControlLastModified] = @ControlLastModified, [ControlFileName] = @ControlFileName, [ControlProperties] = @ControlProperties, [ControlResourceID] = @ControlResourceID WHERE [ControlID] = @ControlID', 0, 877, 0, '20081229 09:07:09', 'efa79324-6be3-4471-b3b7-624e0cdfafb9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2399, N'searchdocuments', 0, N'SELECT View_CMS_Tree_Joined.*, SearchResultName = CASE View_CMS_Tree_Joined.DocumentName WHEN '''' THEN ''/'' else View_CMS_Tree_Joined.DocumentName END 
FROM View_CMS_Tree_Joined
WHERE 
(
[DocumentName] LIKE N''%'' + @Expression + N''%''
OR
[NodeName] LIKE N''%'' + @Expression + N''%''
OR
[DocumentUrlPath] LIKE N''%'' + @Expression + N''%''
OR
[DocumentPageTitle] LIKE N''%'' + @Expression + N''%''
OR
[DocumentPageKeyWords] LIKE N''%'' + @Expression + N''%''
OR
[DocumentPageDescription] LIKE N''%'' + @Expression + N''%''
OR
[DocumentMenuCaption] LIKE N''%'' + @Expression + N''%''
OR
[DocumentContent] LIKE N''%'' + @Expression + N''%''
)
AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1095, 1, '20101005 09:08:24', 'e59b6ae0-1d3f-4ee8-8fdc-720fae543868', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (291, N'initnodeorders', 1, N'Proc_CMS_Tree_InitNodeOrders', 1, 143, 0, '20101005 09:31:48', 'c1f0a217-9992-4bda-b279-c415b1e659df', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5754, N'gettaskbinarydata', 0, N'SELECT TaskBinaryData FROM [CMS_WebFarmTask] WHERE TaskID = @TaskID AND TaskBinaryData IS NOT NULL', 0, 1093, 0, '20101005 09:45:40', '089fef59-c228-4de4-b239-e247609d16d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2440, N'getPagesForTemplate', 0, N'SELECT [NodeAliasPath],[DocumentCulture],[NodeSiteID],[DocumentUrlPath]  FROM View_PageInfo WHERE PageTemplateCodeName = @CodeName', 0, 157, 0, '20101005 10:12:29', '50558478-5480-468a-95a9-1e659168f0be', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2259, N'setservertasks', 0, N'INSERT INTO [CMS_WebFarmServerTask] ( [ServerID], [TaskID] ) VALUES (  @ServerID, @TaskID)', 0, 1093, 0, '20101005 10:42:50', '44adc6bd-4059-4065-99a1-b8ae4c2bfd6d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2291, N'SetErrorInTask', 0, N'UPDATE [CMS_WebFarmServerTask] SET [ErrorMessage]=@Message WHERE [ServerID]=@ServerID AND [TaskID]=@TaskID', 0, 1093, 0, '20101005 11:36:54', '0c066943-b46e-4ad4-aefe-30310be35a92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2913, N'removemoderator', 0, N'DELETE FROM [Forums_ForumModerators ] WHERE ForumID = @ForumID AND UserID = @UserID', 0, 1122, 0, '20101005 11:47:02', '55e00c6c-874f-4bf5-8992-243637bcbb89', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (781, N'delete', 0, N'DELETE FROM CMS_WebTemplate WHERE [WebTemplateID] = @ID', 0, 500, 0, '20081229 09:07:41', '245a0494-7f6b-4921-a883-17f5ea257a51', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (775, N'insert', 0, N'INSERT INTO CMS_WebTemplate ([WebTemplateDisplayName], [WebTemplateFileName], [WebTemplateDescription], [WebTemplateGUID], [WebTemplateLastModified], [WebTemplateName], [WebTemplateOrder], [WebTemplateLicenses], [WebTemplatePackages] ) VALUES ( @WebTemplateDisplayName, @WebTemplateFileName, @WebTemplateDescription, @WebTemplateGUID, @WebTemplateLastModified, @WebTemplateName, @WebTemplateOrder, @WebTemplateLicenses, @WebTemplatePackages); SELECT SCOPE_IDENTITY() AS [WebTemplateID]', 1, 500, 0, '20081229 09:07:41', '7cd9aeb8-6485-4253-bec8-04b2dec05152', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (771, N'update', 0, N'UPDATE CMS_WebTemplate SET [WebTemplateDisplayName] = @WebTemplateDisplayName, [WebTemplateFileName] = @WebTemplateFileName, [WebTemplateDescription] = @WebTemplateDescription, [WebTemplateGUID] = @WebTemplateGUID, [WebTemplateLastModified] = @WebTemplateLastModified, [WebTemplateName] = @WebTemplateName, [WebTemplateOrder] = @WebTemplateOrder, [WebTemplateLicenses] = @WebTemplateLicenses, [WebTemplatePackages] = @WebTemplatePackages WHERE [WebTemplateID] = @WebTemplateID', 0, 500, 0, '20081229 09:07:41', 'db3cb367-fedd-4c5c-8126-607a5aecca8d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11120, N'MyDeskUpgrade', 1, N'Proc_CMS_UIElement_MyDesk_Upgrade', 0, 2195, 0, '20101018 13:20:54', '80ccacd1-9192-4a38-8ca6-1677bbfd02d4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3784, N'getcodenames', 0, N'SELECT DISTINCT ##TOPN## StatisticsCode FROM Analytics_Statistics WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1366, 0, '20101025 18:34:24', '5f9a64eb-fe29-47df-bedc-f0e0006160b6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2694, N'delete', 0, N'DELETE FROM COM_DiscountCoupon WHERE [DiscountCouponID] = @ID', 0, 1149, 0, '20081229 09:07:00', '2a0642be-9c13-47e9-935b-43bb40ebbd26', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2695, N'insert', 0, N'INSERT INTO COM_DiscountCoupon ([DiscountCouponDisplayName], [DiscountCouponIsExcluded], [DiscountCouponValidFrom], [DiscountCouponValidTo], [DiscountCouponValue], [DiscountCouponIsFlatValue], [DiscountCouponCode], [DiscountCouponGUID], [DiscountCouponLastModified], [DiscountCouponSiteID] ) VALUES ( @DiscountCouponDisplayName, @DiscountCouponIsExcluded, @DiscountCouponValidFrom, @DiscountCouponValidTo, @DiscountCouponValue, @DiscountCouponIsFlatValue, @DiscountCouponCode, @DiscountCouponGUID, @DiscountCouponLastModified, @DiscountCouponSiteID); SELECT SCOPE_IDENTITY() AS [DiscountCouponID]', 1, 1149, 0, '20081229 09:07:00', '1dcae2b2-2a96-431f-82ad-c774a82ff5ee', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2696, N'update', 0, N'UPDATE COM_DiscountCoupon SET [DiscountCouponDisplayName] = @DiscountCouponDisplayName, [DiscountCouponIsExcluded] = @DiscountCouponIsExcluded, [DiscountCouponValidFrom] = @DiscountCouponValidFrom, [DiscountCouponValidTo] = @DiscountCouponValidTo, [DiscountCouponValue] = @DiscountCouponValue, [DiscountCouponIsFlatValue] = @DiscountCouponIsFlatValue, [DiscountCouponCode] = @DiscountCouponCode, [DiscountCouponGUID] = @DiscountCouponGUID, [DiscountCouponLastModified] = @DiscountCouponLastModified, [DiscountCouponSiteID] = @DiscountCouponSiteID WHERE [DiscountCouponID] = @DiscountCouponID', 0, 1149, 0, '20081229 09:07:00', 'a0fb272d-4bf9-4349-96c9-280d1405bed1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3825, N'delete', 0, N'DELETE FROM COM_DiscountLevel WHERE [DiscountLevelID] = @ID', 0, 1429, 0, '20081229 09:07:00', '8d4bf211-536c-4c51-896f-2193bfb8bde8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3826, N'insert', 0, N'INSERT INTO COM_DiscountLevel ([DiscountLevelDisplayName], [DiscountLevelName], [DiscountLevelValue], [DiscountLevelEnabled], [DiscountLevelValidFrom], [DiscountLevelValidTo], [DiscountLevelGUID], [DiscountLevelLastModified], [DiscountLevelSiteID] ) VALUES ( @DiscountLevelDisplayName, @DiscountLevelName, @DiscountLevelValue, @DiscountLevelEnabled, @DiscountLevelValidFrom, @DiscountLevelValidTo, @DiscountLevelGUID, @DiscountLevelLastModified, @DiscountLevelSiteID); SELECT SCOPE_IDENTITY() AS [DiscountLevelID]', 1, 1429, 0, '20081229 09:07:00', 'c367f10a-e487-42e1-82d1-c6df46635046', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3827, N'update', 0, N'UPDATE COM_DiscountLevel SET [DiscountLevelDisplayName] = @DiscountLevelDisplayName, [DiscountLevelName] = @DiscountLevelName, [DiscountLevelValue] = @DiscountLevelValue, [DiscountLevelEnabled] = @DiscountLevelEnabled, [DiscountLevelValidFrom] = @DiscountLevelValidFrom, [DiscountLevelValidTo] = @DiscountLevelValidTo, [DiscountLevelGUID] = @DiscountLevelGUID, [DiscountLevelLastModified] = @DiscountLevelLastModified, [DiscountLevelSiteID] = @DiscountLevelSiteID WHERE [DiscountLevelID] = @DiscountLevelID', 0, 1429, 0, '20081229 09:07:00', '48578cae-3067-48af-ab28-9bbcac66b270', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2646, N'delete', 0, N'DELETE FROM COM_Manufacturer WHERE [ManufacturerID] = @ID', 0, 1142, 0, '20081229 09:07:00', 'b2957a9c-e334-4730-a398-1f098e6ba538', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2647, N'insert', 0, N'INSERT INTO COM_Manufacturer ([ManufacturerDisplayName], [ManufactureHomepage], [ManufacturerEnabled], [ManufacturerGUID], [ManufacturerLastModified], [ManufacturerSiteID] ) VALUES ( @ManufacturerDisplayName, @ManufactureHomepage, @ManufacturerEnabled, @ManufacturerGUID, @ManufacturerLastModified, @ManufacturerSiteID); SELECT SCOPE_IDENTITY() AS [ManufacturerID]', 1, 1142, 0, '20081229 09:07:01', 'dba0966f-ea96-4175-8a2f-b7f5537a7f48', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2648, N'update', 0, N'UPDATE COM_Manufacturer SET [ManufacturerDisplayName] = @ManufacturerDisplayName, [ManufactureHomepage] = @ManufactureHomepage, [ManufacturerEnabled] = @ManufacturerEnabled, [ManufacturerGUID] = @ManufacturerGUID, [ManufacturerLastModified] = @ManufacturerLastModified, [ManufacturerSiteID] = @ManufacturerSiteID WHERE [ManufacturerID] = @ManufacturerID', 0, 1142, 0, '20081229 09:07:01', '37a2e770-5c29-41b7-83df-8592bcf083a7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2639, N'delete', 0, N'DELETE FROM COM_Supplier WHERE [SupplierID] = @ID', 0, 1141, 0, '20081229 09:07:03', 'a09bcca6-88de-4e4a-b166-2fc30d71570f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2640, N'insert', 0, N'INSERT INTO COM_Supplier ([SupplierDisplayName], [SupplierPhone], [SupplierEmail], [SupplierFax], [SupplierEnabled], [SupplierGUID], [SupplierLastModified], [SupplierSiteID] ) VALUES ( @SupplierDisplayName, @SupplierPhone, @SupplierEmail, @SupplierFax, @SupplierEnabled, @SupplierGUID, @SupplierLastModified, @SupplierSiteID); SELECT SCOPE_IDENTITY() AS [SupplierID]', 1, 1141, 0, '20081229 09:07:03', '6ca06c27-9cc9-453b-8488-8076845ac419', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2641, N'update', 0, N'UPDATE COM_Supplier SET [SupplierDisplayName] = @SupplierDisplayName, [SupplierPhone] = @SupplierPhone, [SupplierEmail] = @SupplierEmail, [SupplierFax] = @SupplierFax, [SupplierEnabled] = @SupplierEnabled, [SupplierGUID] = @SupplierGUID, [SupplierLastModified] = @SupplierLastModified, [SupplierSiteID] = @SupplierSiteID WHERE [SupplierID] = @SupplierID', 0, 1141, 0, '20081229 09:07:03', 'b988bb1d-d05a-4cfa-8c57-f8fdc30c8b34', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2684, N'delete', 0, N'DELETE FROM COM_Department WHERE [DepartmentID] = @ID', 0, 1148, 0, '20081229 09:07:00', '6c59cb47-9af4-4d95-a5c2-ad9828b9788d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2685, N'insert', 0, N'INSERT INTO COM_Department ([DepartmentName], [DepartmentDisplayName], [DepartmentDefaultTaxClassID], [DepartmentGUID], [DepartmentLastModified], [DepartmentSiteID] ) VALUES ( @DepartmentName, @DepartmentDisplayName, @DepartmentDefaultTaxClassID, @DepartmentGUID, @DepartmentLastModified, @DepartmentSiteID); SELECT SCOPE_IDENTITY() AS [DepartmentID]', 1, 1148, 0, '20081229 09:07:00', 'fdae147f-91c8-465a-8ff3-1d4b6b6d4459', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2686, N'update', 0, N'UPDATE COM_Department SET [DepartmentName] = @DepartmentName, [DepartmentDisplayName] = @DepartmentDisplayName, [DepartmentDefaultTaxClassID] = @DepartmentDefaultTaxClassID, [DepartmentGUID] = @DepartmentGUID, [DepartmentLastModified] = @DepartmentLastModified, [DepartmentSiteID] = @DepartmentSiteID WHERE [DepartmentID] = @DepartmentID', 0, 1148, 0, '20081229 09:07:00', 'b6711b04-27e5-474b-a201-ba107c16119b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2724, N'delete', 0, N'DELETE FROM COM_TaxClass WHERE [TaxClassID] = @ID', 0, 1152, 0, '20081229 09:07:03', '9a7d038e-3005-4db0-8f41-73f01beeb45e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2725, N'insert', 0, N'INSERT INTO COM_TaxClass ([TaxClassName], [TaxClassDisplayName], [TaxClassZeroIfIDSupplied], [TaxClassGUID], [TaxClassLastModified], [TaxClassSiteID] ) VALUES ( @TaxClassName, @TaxClassDisplayName, @TaxClassZeroIfIDSupplied, @TaxClassGUID, @TaxClassLastModified, @TaxClassSiteID); SELECT SCOPE_IDENTITY() AS [TaxClassID]', 1, 1152, 0, '20081229 09:07:03', 'c8e0a950-fc52-452f-aba0-968cabb6ed73', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2726, N'update', 0, N'UPDATE COM_TaxClass SET [TaxClassName] = @TaxClassName, [TaxClassDisplayName] = @TaxClassDisplayName, [TaxClassZeroIfIDSupplied] = @TaxClassZeroIfIDSupplied, [TaxClassGUID] = @TaxClassGUID, [TaxClassLastModified] = @TaxClassLastModified, [TaxClassSiteID] = @TaxClassSiteID WHERE [TaxClassID] = @TaxClassID', 0, 1152, 0, '20081229 09:07:03', 'b08bea04-1de9-4394-8608-0db098ef82ee', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2667, N'delete', 0, N'DELETE FROM COM_PublicStatus WHERE [PublicStatusID] = @ID', 0, 1145, 0, '20081229 09:07:02', 'adfabe67-0d0f-4c79-aa69-360132fd82b2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2668, N'insert', 0, N'INSERT INTO COM_PublicStatus ([PublicStatusName], [PublicStatusDisplayName], [PublicStatusEnabled], [PublicStatusGUID], [PublicStatusLastModified], [PublicStatusSiteID] ) VALUES ( @PublicStatusName, @PublicStatusDisplayName, @PublicStatusEnabled, @PublicStatusGUID, @PublicStatusLastModified, @PublicStatusSiteID); SELECT SCOPE_IDENTITY() AS [PublicStatusID]', 1, 1145, 0, '20081229 09:07:02', '0d1ddf15-d33e-4432-9e87-8c07865232cc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2669, N'update', 0, N'UPDATE COM_PublicStatus SET [PublicStatusName] = @PublicStatusName, [PublicStatusDisplayName] = @PublicStatusDisplayName, [PublicStatusEnabled] = @PublicStatusEnabled, [PublicStatusGUID] = @PublicStatusGUID, [PublicStatusLastModified] = @PublicStatusLastModified, [PublicStatusSiteID] = @PublicStatusSiteID WHERE [PublicStatusID] = @PublicStatusID', 0, 1145, 0, '20081229 09:07:02', 'ac02a171-3b4e-43af-b035-46962a1ca75c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2678, N'delete', 0, N'DELETE FROM COM_InternalStatus WHERE [InternalStatusID] = @ID', 0, 1147, 0, '20081229 09:07:00', '5e09a956-b566-4ac6-8c37-1f48a5a98fc6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2679, N'insert', 0, N'INSERT INTO COM_InternalStatus ([InternalStatusName], [InternalStatusDisplayName], [InternalStatusEnabled], [InternalStatusGUID], [InternalStatusLastModified], [InternalStatusSiteID] ) VALUES ( @InternalStatusName, @InternalStatusDisplayName, @InternalStatusEnabled, @InternalStatusGUID, @InternalStatusLastModified, @InternalStatusSiteID); SELECT SCOPE_IDENTITY() AS [InternalStatusID]', 1, 1147, 0, '20081229 09:07:00', 'b61d97ee-b506-41f7-99dc-3e800f212908', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2680, N'update', 0, N'UPDATE COM_InternalStatus SET [InternalStatusName] = @InternalStatusName, [InternalStatusDisplayName] = @InternalStatusDisplayName, [InternalStatusEnabled] = @InternalStatusEnabled, [InternalStatusGUID] = @InternalStatusGUID, [InternalStatusLastModified] = @InternalStatusLastModified, [InternalStatusSiteID] = @InternalStatusSiteID WHERE [InternalStatusID] = @InternalStatusID', 0, 1147, 0, '20081229 09:07:00', '20237157-814d-41e4-ba84-32e70d302f3c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2256, N'getservertasks', 0, N'SELECT * FROM [CMS_WebFarmServerTask] LEFT JOIN [CMS_WebFarmTask] On [CMS_WebFarmServerTask].[TaskID] = [CMS_WebFarmTask].[TaskID] WHERE ServerID = (Select TOP 1 ServerID from CMS_WebFarmServer where ServerName = @ServerName)  AND CMS_WebFarmServerTask.ErrorMessage IS NULL', 0, 1093, 0, '20101115 13:29:26', '6ce1670c-959b-45e5-b805-0d5e25abec1f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5746, N'gettopservertasks', 0, N'SELECT TOP 10 [CMS_WebFarmTask].[TaskID],[CMS_WebFarmTask].[TaskType],[CMS_WebFarmServerTask].[ServerID],[CMS_WebFarmTask].[TaskTextData], [CMS_WebFarmTask].[TaskTarget], [CMS_WebFarmTask].[TaskMachineName] FROM [CMS_WebFarmServerTask] INNER JOIN [CMS_WebFarmTask] On [CMS_WebFarmServerTask].[TaskID] = [CMS_WebFarmTask].[TaskID] WHERE ServerID = (Select TOP 1 ServerID from CMS_WebFarmServer where ServerName = @ServerName) AND CMS_WebFarmServerTask.ErrorMessage IS NULL AND TaskEnabled = 1', 0, 1093, 0, '20101115 13:30:09', 'f08cd43e-d4eb-4cb2-87f7-63fed91ead1d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2400, N'searchattachments', 0, N'/* 
Uncomment the following query after you configure Kentico CMS for full-text search as described in Developers Guide -> Installation and deployment -> Configuration of full-text search in files
*/
/*
SELECT View_CMS_Tree_Joined.*, View_CMS_Tree_Joined.NodeName AS SearchResultName
FROM CMS_Attachment INNER JOIN View_CMS_Tree_Joined
ON View_CMS_Tree_Joined.DocumentID = CMS_Attachment.AttachmentDocumentID
WHERE (##WHERE##) AND
(([AttachmentName] Like N''%''+ @Expression + N''%'') OR ([AttachmentTitle] Like N''%''+ @Expression + N''%'') OR ([AttachmentDescription] Like N''%''+ @Expression + N''%'')) OR (FREETEXT(AttachmentBinary, @expression)) 
ORDER BY ##ORDERBY##
*/
SELECT View_CMS_Tree_Joined.*, View_CMS_Tree_Joined.DocumentName AS SearchResultName
FROM CMS_Attachment INNER JOIN View_CMS_Tree_Joined 
ON View_CMS_Tree_Joined.DocumentID = CMS_Attachment.AttachmentDocumentID 
WHERE (##WHERE##) AND (([AttachmentName] Like N''%''+ @Expression + N''%'') OR ([AttachmentTitle] Like N''%''+ @Expression + N''%'') OR ([AttachmentDescription] Like N''%''+ @Expression + N''%'')) ORDER BY ##ORDERBY##', 0, 1095, 1, '20101115 15:16:17', 'faa8ff41-9e2a-455e-b58b-5bd9c471a503', 2, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11615, N'logclick', 1, N'Proc_Newsletter_Link_Log', 0, 2694, 0, '20101118 14:48:40', '2845533e-3ef4-4df2-91e3-2ac8ab35bd6d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11617, N'removedependencies', 1, N'Proc_Newsletter_Link_RemoveDependencies', 0, 2694, 0, '20101118 23:40:33', '4fd70815-e2c2-4c3b-b694-018b50a2f0b2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1123, N'delete', 0, N'DELETE FROM CMS_FormUserControl WHERE [UserControlID] = @ID', 0, 846, 0, '20100826 18:22:09', 'bbb5c617-237f-4af8-b881-1203b891c499', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1122, N'insert', 0, N'INSERT INTO CMS_FormUserControl ([UserControlDisplayName], [UserControlCodeName], [UserControlFileName], [UserControlForText], [UserControlForLongText], [UserControlForInteger], [UserControlForDecimal], [UserControlForDateTime], [UserControlForBoolean], [UserControlForFile], [UserControlShowInBizForms], [UserControlDefaultDataType], [UserControlDefaultDataTypeSize], [UserControlShowInDocumentTypes], [UserControlShowInSystemTables], [UserControlShowInWebParts], [UserControlShowInReports], [UserControlGUID], [UserControlLastModified], [UserControlForGuid], [UserControlShowInCustomTables], [UserControlForVisibility], [UserControlParameters], [UserControlForDocAttachments], [UserControlForLongInteger], [UserControlResourceID], [UserControlType] ) VALUES ( @UserControlDisplayName, @UserControlCodeName, @UserControlFileName, @UserControlForText, @UserControlForLongText, @UserControlForInteger, @UserControlForDecimal, @UserControlForDateTime, @UserControlForBoolean, @UserControlForFile, @UserControlShowInBizForms, @UserControlDefaultDataType, @UserControlDefaultDataTypeSize, @UserControlShowInDocumentTypes, @UserControlShowInSystemTables, @UserControlShowInWebParts, @UserControlShowInReports, @UserControlGUID, @UserControlLastModified, @UserControlForGuid, @UserControlShowInCustomTables, @UserControlForVisibility, @UserControlParameters, @UserControlForDocAttachments, @UserControlForLongInteger, @UserControlResourceID, @UserControlType); SELECT SCOPE_IDENTITY() AS [UserControlID]', 1, 846, 0, '20081229 09:07:07', 'c78a9d4f-3091-4a57-aa42-61c87eb9653a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1120, N'update', 0, N'UPDATE CMS_FormUserControl SET [UserControlDisplayName] = @UserControlDisplayName, [UserControlCodeName] = @UserControlCodeName, [UserControlFileName] = @UserControlFileName, [UserControlForText] = @UserControlForText, [UserControlForLongText] = @UserControlForLongText, [UserControlForInteger] = @UserControlForInteger, [UserControlForDecimal] = @UserControlForDecimal, [UserControlForDateTime] = @UserControlForDateTime, [UserControlForBoolean] = @UserControlForBoolean, [UserControlForFile] = @UserControlForFile, [UserControlShowInBizForms] = @UserControlShowInBizForms, [UserControlDefaultDataType] = @UserControlDefaultDataType, [UserControlDefaultDataTypeSize] = @UserControlDefaultDataTypeSize, [UserControlShowInDocumentTypes] = @UserControlShowInDocumentTypes, [UserControlShowInSystemTables] = @UserControlShowInSystemTables, [UserControlShowInWebParts] = @UserControlShowInWebParts, [UserControlShowInReports] = @UserControlShowInReports, [UserControlGUID] = @UserControlGUID, [UserControlLastModified] = @UserControlLastModified, [UserControlForGuid] = @UserControlForGuid, [UserControlShowInCustomTables] = @UserControlShowInCustomTables, [UserControlForVisibility] = @UserControlForVisibility, [UserControlParameters] = @UserControlParameters, [UserControlForDocAttachments] = @UserControlForDocAttachments, [UserControlForLongInteger] = @UserControlForLongInteger, [UserControlResourceID] = @UserControlResourceID, [UserControlType] = @UserControlType WHERE [UserControlID] = @UserControlID', 0, 846, 0, '20081229 09:07:07', '63cefb46-1c21-4bf4-bd2a-72d8c9dd6460', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11628, N'selectAllIssues', 0, N'SELECT ##TOPN## ##COLUMNS## FROM [View_Newsletter_Issue_Joined] WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 907, 0, '20101122 11:30:57', '92443add-7a13-4a19-850a-e4bf5a31a947', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (918, N'delete', 0, N'DELETE FROM CMS_Site WHERE [SiteID] = @ID', 0, 52, 0, '20081229 09:07:23', '3b0d5748-e543-4ac0-9e6d-08aad2960600', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (919, N'insert', 0, N'INSERT INTO CMS_Site ([SiteName], [SiteDisplayName], [SiteDescription], [SiteStatus], [SiteDomainName], [SiteDefaultStylesheetID], [SiteDefaultVisitorCulture], [SiteDefaultEditorStylesheet], [SiteGUID], [SiteLastModified], [SiteIsOffline], [SiteOfflineRedirectURL], [SiteOfflineMessage] ) VALUES ( @SiteName, @SiteDisplayName, @SiteDescription, @SiteStatus, @SiteDomainName, @SiteDefaultStylesheetID, @SiteDefaultVisitorCulture, @SiteDefaultEditorStylesheet, @SiteGUID, @SiteLastModified, @SiteIsOffline, @SiteOfflineRedirectURL, @SiteOfflineMessage); SELECT SCOPE_IDENTITY() AS [SiteID]', 1, 52, 0, '20100831 09:51:12', '9f5d65f0-dd82-49da-83e9-1cb1592b191f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (920, N'update', 0, N'UPDATE CMS_Site SET [SiteName] = @SiteName, [SiteDisplayName] = @SiteDisplayName, [SiteDescription] = @SiteDescription, [SiteStatus] = @SiteStatus, [SiteDomainName] = @SiteDomainName, [SiteDefaultStylesheetID] = @SiteDefaultStylesheetID, [SiteDefaultVisitorCulture] = @SiteDefaultVisitorCulture, [SiteDefaultEditorStylesheet] = @SiteDefaultEditorStylesheet, [SiteGUID] = @SiteGUID, [SiteLastModified] = @SiteLastModified, [SiteIsOffline] = @SiteIsOffline, [SiteOfflineRedirectURL] = @SiteOfflineRedirectURL, [SiteOfflineMessage] = @SiteOfflineMessage WHERE [SiteID] = @SiteID', 0, 52, 0, '20100831 09:54:22', '7ac03a1a-30ba-4890-b058-e57133dcfb78', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6374, N'delete', 0, N'DELETE FROM BadWords_Word WHERE [WordID] = @ID', 0, 1771, 0, '20101124 19:03:05', '148dd09f-203e-4ae3-91d8-320fa0ac6c64', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6375, N'insert', 0, N'INSERT INTO BadWords_Word ([WordGUID], [WordLastModified], [WordExpression], [WordReplacement], [WordAction], [WordIsGlobal], [WordIsRegularExpression], [WordMatchWholeWord] ) VALUES ( @WordGUID, @WordLastModified, @WordExpression, @WordReplacement, @WordAction, @WordIsGlobal, @WordIsRegularExpression, @WordMatchWholeWord); SELECT SCOPE_IDENTITY() AS [WordID]', 1, 1771, 0, '20101124 19:03:14', '0d4d5545-617d-49b5-b12c-133af3a38356', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6376, N'update', 0, N'UPDATE BadWords_Word SET [WordGUID] = @WordGUID, [WordLastModified] = @WordLastModified, [WordExpression] = @WordExpression, [WordReplacement] = @WordReplacement, [WordAction] = @WordAction, [WordIsGlobal] = @WordIsGlobal, [WordIsRegularExpression] = @WordIsRegularExpression, [WordMatchWholeWord] = @WordMatchWholeWord WHERE [WordID] = @WordID', 0, 1771, 0, '20101124 19:04:01', '265e7f19-4acc-4272-a9e1-14727bdd8cfa', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11716, N'expiredcount', 1, N'Proc_CMS_Email_ExpiredCount', 0, 1809, 0, '20101208 19:52:45', 'c2adc2c7-3e7d-4ac2-b3c2-be31cbc59700', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2712, N'delete', 0, N'DELETE FROM COM_ShippingOption WHERE [ShippingOptionID] = @ID', 0, 1150, 0, '20081229 09:07:02', 'dd5fd178-3a7d-4e97-b34b-a940174df16d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2713, N'insert', 0, N'INSERT INTO COM_ShippingOption ([ShippingOptionName], [ShippingOptionDisplayName], [ShippingOptionCharge], [ShippingOptionEnabled], [ShippingOptionSiteID], [ShippingOptionGUID], [ShippingOptionLastModified] ) VALUES ( @ShippingOptionName, @ShippingOptionDisplayName, @ShippingOptionCharge, @ShippingOptionEnabled, @ShippingOptionSiteID, @ShippingOptionGUID, @ShippingOptionLastModified); SELECT SCOPE_IDENTITY() AS [ShippingOptionID]', 1, 1150, 0, '20081229 09:07:02', '99e5082f-94d1-4156-8dbe-cfac542b48dc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2714, N'update', 0, N'UPDATE COM_ShippingOption SET [ShippingOptionName] = @ShippingOptionName, [ShippingOptionDisplayName] = @ShippingOptionDisplayName, [ShippingOptionCharge] = @ShippingOptionCharge, [ShippingOptionEnabled] = @ShippingOptionEnabled, [ShippingOptionSiteID] = @ShippingOptionSiteID, [ShippingOptionGUID] = @ShippingOptionGUID, [ShippingOptionLastModified] = @ShippingOptionLastModified WHERE [ShippingOptionID] = @ShippingOptionID', 0, 1150, 0, '20081229 09:07:02', 'd436b25d-166c-419c-a189-53baab8d6652', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2747, N'delete', 0, N'DELETE FROM COM_Address WHERE [AddressID] = @ID', 0, 1156, 0, '20081229 09:06:59', 'd4e7add1-704c-4979-aabc-0ec87281ef09', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2748, N'insert', 0, N'INSERT INTO COM_Address ([AddressName], [AddressLine1], [AddressLine2], [AddressCity], [AddressZip], [AddressPhone], [AddressCustomerID], [AddressCountryID], [AddressStateID], [AddressIsBilling], [AddressEnabled], [AddressPersonalName], [AddressIsShipping], [AddressIsCompany], [AddressGUID], [AddressLastModified] ) VALUES ( @AddressName, @AddressLine1, @AddressLine2, @AddressCity, @AddressZip, @AddressPhone, @AddressCustomerID, @AddressCountryID, @AddressStateID, @AddressIsBilling, @AddressEnabled, @AddressPersonalName, @AddressIsShipping, @AddressIsCompany, @AddressGUID, @AddressLastModified); SELECT SCOPE_IDENTITY() AS [AddressID]', 1, 1156, 0, '20081229 09:06:59', '30e869ed-5697-4d2b-b6b9-beadcc0d2cba', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2749, N'update', 0, N'UPDATE COM_Address SET [AddressName] = @AddressName, [AddressLine1] = @AddressLine1, [AddressLine2] = @AddressLine2, [AddressCity] = @AddressCity, [AddressZip] = @AddressZip, [AddressPhone] = @AddressPhone, [AddressCustomerID] = @AddressCustomerID, [AddressCountryID] = @AddressCountryID, [AddressStateID] = @AddressStateID, [AddressIsBilling] = @AddressIsBilling, [AddressEnabled] = @AddressEnabled, [AddressPersonalName] = @AddressPersonalName, [AddressIsShipping] = @AddressIsShipping, [AddressIsCompany] = @AddressIsCompany, [AddressGUID] = @AddressGUID, [AddressLastModified] = @AddressLastModified WHERE [AddressID] = @AddressID', 0, 1156, 0, '20081229 09:07:00', '9834cfb6-e807-451a-8091-1e491cfaff92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2654, N'delete', 0, N'DELETE FROM COM_Currency WHERE [CurrencyID] = @ID', 0, 1143, 0, '20081229 09:07:00', '79ffce9a-17a7-4dc7-bc44-cc6880d4a49f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2655, N'insert', 0, N'INSERT INTO COM_Currency ([CurrencyName], [CurrencyDisplayName], [CurrencyCode], [CurrencyRoundTo], [CurrencyEnabled], [CurrencyFormatString], [CurrencyIsMain], [CurrencyGUID], [CurrencyLastModified], [CurrencySiteID] ) VALUES ( @CurrencyName, @CurrencyDisplayName, @CurrencyCode, @CurrencyRoundTo, @CurrencyEnabled, @CurrencyFormatString, @CurrencyIsMain, @CurrencyGUID, @CurrencyLastModified, @CurrencySiteID); SELECT SCOPE_IDENTITY() AS [CurrencyID]', 1, 1143, 0, '20081229 09:07:00', '8ed68f9e-3c87-41f2-92e6-79e26e15c9f9', 2, NULL)
SET IDENTITY_INSERT [CMS_Query] OFF
